home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / inter33a.zip / INTERRUP.C < prev    next >
Text File  |  1993-01-03  |  354KB  |  9,352 lines

  1. Interrupt List, part 3 of 8
  2. This compilation is Copyright (c) 1989,1990,1991,1992,1993 Ralf Brown
  3. ----------20---------------------------------
  4. INT 20 - Minix - SEND/RECEIVE MESSAGE
  5.     AX = process ID of other process
  6.     BX -> message
  7.     CX = 1 send
  8.          2 receive
  9.          3 send&receive
  10. Note:    the message contains the system call number (numbered as in V7 
  11.       Unix(tm)) and the call parameters
  12. ----------20---------------------------------
  13. INT 20 - DOS 1+ - TERMINATE PROGRAM
  14.     CS = PSP segment
  15. Return: never
  16. Note:    (see INT 21/AH=00h)
  17. SeeAlso: INT 21/AH=00h,INT 21/AH=4Ch
  18. ---------------------------------------------
  19. INT 20 - COMTROL HOSTESS i/ISA DEBUGGER - INVOKE FIRMWARE DEBUGGER
  20.     ???
  21. Return: ???
  22. SeeAlso: INT 21"COMTROL HOSTESS"
  23. ---------------------------------------------
  24. INT 21 - COMTROL HOSTESS i/ISA DEBUGGER - GET SEGMENT FOR CONTROL PROGRAM USE
  25.     ???
  26. Return: AX = first segment available for control program use
  27. SeeAlso: INT 20"COMTROL HOSTESS",INT 22"COMTROL HOSTESS"
  28. ----------2100-------------------------------
  29. INT 21 - DOS 1+ - TERMINATE PROGRAM
  30.     AH = 00h
  31.     CS = PSP segment
  32. Notes:    Microsoft recomments using INT 21/AH=4Ch for DOS 2+
  33.     execution continues at address stored in INT 22 after DOS performs
  34.       whatever cleanup it needs to do
  35.     if the PSP is its own parent, the process's memory is not freed; if
  36.       INT 22 additionally points into the terminating program, the
  37.       process is effectively NOT terminated
  38.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  39. SeeAlso: AH=26h,AH=31h,AH=4Ch,INT 20,INT 22
  40. ----------2101-------------------------------
  41. INT 21 - DOS 1+ - READ CHARACTER FROM STANDARD INPUT, WITH ECHO
  42.     AH = 01h
  43. Return: AL = character read
  44. Notes:    ^C/^Break are checked, and INT 23 executed if read
  45.     character is echoed to standard output
  46.     standard input is always the keyboard and standard output the screen
  47.       under DOS 1.x, but they may be redirected under DOS 2+
  48. SeeAlso: AH=06h,AH=07h,AH=08h,AH=0Ah
  49. ----------2102-------------------------------
  50. INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
  51.     AH = 02h
  52.     DL = character to write
  53. Return: AL = last character output (despite the official docs which state
  54.         nothing is returned) (at least DOS 3.3-5.0)
  55. Notes:    ^C/^Break are checked, and INT 23 executed if pressed
  56.     standard output is always the screen under DOS 1.x, but may be
  57.       redirected under DOS 2+
  58.     the last character output will be the character in DL unless DL=09h
  59.       on entry, in which case AL=20h as tabs are expanded to blanks
  60. SeeAlso: AH=06h,AH=09h
  61. ----------2103-------------------------------
  62. INT 21 - DOS 1+ - READ CHARACTER FROM STDAUX
  63.     AH = 03h
  64. Return: AL = character read
  65. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  66.     STDAUX is usually the first serial port
  67. SeeAlso: AH=04h,INT 14/AH=02h,INT E0/CL=03h
  68. ----------2104-------------------------------
  69. INT 21 - DOS 1+ - WRITE CHARACTER TO STDAUX
  70.     AH = 04h
  71.     DL = character to write
  72. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  73.     STDAUX is usually the first serial port
  74.     if STDAUX is busy, this function will wait until it becomes free
  75. SeeAlso: AH=03h,INT 14/AH=01h,INT E0/CL=04h
  76. ----------2105-------------------------------
  77. INT 21 - DOS 1+ - WRITE CHARACTER TO PRINTER
  78.     AH = 05h
  79.     DL = character to print
  80. Notes:    keyboard checked for ^C/^Break, and INT 23 executed if detected
  81.     STDPRN is usually the first parallel port, but may be redirected under
  82.       DOS 2+
  83.     if the printer is busy, this function will wait
  84. SeeAlso: INT 17/AH=00h
  85. ----------2106-------------------------------
  86. INT 21 - DOS 1+ - DIRECT CONSOLE OUTPUT
  87.     AH = 06h
  88.     DL = character (except FFh)
  89. Return: AL = character output (despite official docs which state nothing is
  90.         returned) (at least DOS 3.3-5.0)
  91. Notes:    does not check ^C/^Break
  92.     writes to standard output, which is always the screen under DOS 1.x,
  93.       but may be redirected under DOS 2+
  94. SeeAlso: AH=02h,AH=09h
  95. ----------2106--DLFF-------------------------
  96. INT 21 - DOS 1+ - DIRECT CONSOLE INPUT
  97.     AH = 06h
  98.     DL = FFh
  99. Return: ZF set if no character available
  100.     ZF clear if character available
  101.         AL = character read
  102. Notes:    ^C/^Break are NOT checked
  103.     if the returned character is 00h, the user pressed a key with an
  104.       extended keycode, which will be returned by the next call of this
  105.       function
  106.     reads from standard input, which is always the keyboard under DOS 1.x,
  107.       but may be redirected under DOS 2+
  108. SeeAlso: AH=0Bh
  109. ----------2107-------------------------------
  110. INT 21 - DOS 1+ - DIRECT CHARACTER INPUT, WITHOUT ECHO
  111.     AH = 07h
  112. Return: AL = character read from standard input
  113. Notes:    does not check ^C/^Break
  114.     standard input is always the keyboard under DOS 1.x, but may be
  115.       redirected under DOS 2+
  116.     if the interim console flag is set (see AX=6301h), partially-formed
  117.       double-byte characters may be returned
  118. SeeAlso: AH=01h,AH=06h,AH=08h,AH=0Ah
  119. ----------2108-------------------------------
  120. INT 21 - DOS 1+ - CHARACTER INPUT WITHOUT ECHO
  121.     AH = 08h
  122. Return: AL = character read from standard input
  123. Notes:    ^C/^Break are checked, and INT 23 executed if detected
  124.     standard input is always the keyboard under DOS 1.x, but may be
  125.       redirected under DOS 2+
  126.     if the interim console flag is set (see AX=6301h), partially-formed
  127.       double-byte characters may be returned
  128. SeeAlso: AH=01h,AH=06h,AH=07h,AH=0Ah,AH=64h
  129. ----------2109-------------------------------
  130. INT 21 - DOS 1+ - WRITE STRING TO STANDARD OUTPUT
  131.     AH = 09h
  132.     DS:DX -> '$'-terminated string
  133. Return: AL = 24h (the '$' terminating the string, despite official docs which
  134.         state that nothing is returned) (at least DOS 3.3-5.0)
  135. Notes:    ^C/^Break are checked, and INT 23 is called if either pressed
  136.     standard output is always the screen under DOS 1.x, but may be
  137.       redirected under DOS 2+
  138.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  139. SeeAlso: AH=02h,AH=06h"OUTPUT"
  140. ----------210A-------------------------------
  141. INT 21 - DOS 1+ - BUFFERED INPUT
  142.     AH = 0Ah
  143.     DS:DX -> buffer (see below)
  144. Return: buffer filled with user input
  145. Notes:    ^C/^Break are checked, and INT 23 is called if either detected
  146.     reads from standard input, which may be redirected under DOS 2+
  147.     if the maximum buffer size (see below) is set to 00h, this call returns
  148.       immediately without reading any input
  149. SeeAlso: AH=0Ch,INT 2F/AX=4810h
  150.  
  151. Format of input buffer:
  152. Offset    Size    Description
  153.  00h    BYTE    maximum characters buffer can hold
  154.  01h    BYTE    (input) number of chars from last input which may be recalled
  155.         (return) number of characters actually read, excluding CR
  156.  02h  N BYTEs    actual characters read, including the final carriage return
  157. ----------210A00-----------------------------
  158. INT 21 - WCED v1.6 - INSTALLATION CHECK
  159.     AX = 0A00h
  160.     DS:DX -> 6-byte buffer whose first two bytes must be 00h
  161. Return: buffer offset 02h-05h filled with "Wced" if installed
  162. Note:    WCED is a free command-line editor and history utility by Stuart
  163.       Russell
  164. SeeAlso: AH=FFh"CED"
  165. ----------210B-------------------------------
  166. INT 21 - DOS 1+ - GET STDIN STATUS
  167.     AH = 0Bh
  168. Return: AL = 00h if no character available
  169.        = FFh if character is available
  170. Notes:    ^C/^Break are checked, and INT 23 is called if either pressed
  171.     standard input is always the keyboard under DOS 1.x, but may be
  172.       redirected under DOS 2+
  173.     if the interim console flag is set (see AX=6301h), this function
  174.       returns AL=FFh if a partially-formed double-byte character is
  175.       available
  176. SeeAlso: AH=06h"INPUT",AX=4406h
  177. ----------210B56-----------------------------
  178. INT 21 - VIRUS - "Perfume" - INSTALLATION CHECK
  179.     AX = 0B56h
  180. Return: AX = 4952h if resident
  181. SeeAlso: AX=0D20h
  182. ----------210C-------------------------------
  183. INT 21 - DOS 1+ - FLUSH BUFFER AND READ STANDARD INPUT
  184.     AH = 0Ch
  185.     AL = STDIN input function to execute after flushing buffer
  186.     other registers as appropriate for the input function
  187. Return: as appropriate for the specified input function
  188. Note:    if AL is not one of 01h,06h,07h,08h, or 0Ah, the buffer is flushed but
  189.       no input is attempted
  190. SeeAlso: AH=01h,AH=06h"INPUT",AH=07h,AH=08h,AH=0Ah
  191. ----------210D-------------------------------
  192. INT 21 - DOS 1+ - DISK RESET
  193.     AH = 0Dh
  194. Notes:    writes all modified disk buffers to disk, but does not update directory
  195.       information (that is only done when files are closed or a SYNC call
  196.       is issued)
  197. SeeAlso: AX=5D01h,INT 13/AH=00h,INT 2F/AX=1120h
  198. ----------210D20-----------------------------
  199. INT 21 - VIRUS - "Crazy Imp" - INSTALLATION CHECK
  200.     AX = 0D20h
  201. Return: AX = 1971h if resident
  202. SeeAlso: AX=0B56h,AH=30h/DX=ABCDh
  203. ----------210E-------------------------------
  204. INT 21 - DOS 1+ - SELECT DEFAULT DRIVE
  205.     AH = 0Eh
  206.     DL = new default drive (00h = A:, 01h = B:, etc)
  207. Return: AL = number of potentially valid drive letters
  208. Notes:    under Novell NetWare, the return value is always 32, the number of
  209.       drives that NetWare supports
  210.     under DOS 3+, the return value is the greatest of 5, the value of
  211.       LASTDRIVE= in CONFIG.SYS, and the number of drives actually present
  212.     on a DOS 1.x/2.x single-floppy system, AL returns 2 since the floppy
  213.       may be accessed as either A: or B:
  214.     otherwise, the return value is the highest drive actually present
  215.     DOS 1.x supports a maximum of 16 drives, 2.x a maximum of 63 drives,
  216.       and 3+ a maximum of 26 drives
  217. SeeAlso: AH=19h,AH=3Bh,AH=DBh
  218. ----------210F-------------------------------
  219. INT 21 - DOS 1+ - OPEN FILE USING FCB
  220.     AH = 0Fh
  221.     DS:DX -> unopened File Control Block (see below)
  222. Return: AL = status
  223.         00h successful
  224.         FFh file not found or access denied
  225. Notes:    (DOS 3.1+) file opened for read/write in compatibility mode
  226.     an unopened FCB has the drive, filename, and extension fields filled
  227.       in and all other bytes cleared
  228.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  229. SeeAlso: AH=10h,AH=16h,AH=3Dh
  230.  
  231. Format of File Control Block:
  232. Offset    Size    Description
  233.  -7    BYTE    extended FCB if FFh
  234.  -6   5 BYTEs    reserved
  235.  -1    BYTE    file attribute if extended FCB
  236.  00h    BYTE    drive number (0 = default, 1 = A, etc)
  237.  01h  8 BYTEs    blank-padded file name 
  238.  09h  3 BYTEs    blank-padded file extension
  239.  0Ch    WORD    current block number
  240.  0Eh    WORD    logical record size
  241.  10h    DWORD    file size
  242.  14h    WORD    date of last write (see AX=5700h)
  243.  16h    WORD    time of last write (see AX=5700h) (DOS 1.1+)
  244.  18h  8 BYTEs    reserved (see below)
  245.  20h    BYTE    record within current block
  246.  21h    DWORD    random access record number (if record size is > 64 bytes, high
  247.         byte is omitted)
  248. Note:    to use an extended FCB, you must specify the address of the FFh flag at
  249.       offset -7, rather than the address of the drive number field
  250.  
  251. Format of reserved field for DOS 1.0:
  252. Offset    Size    Description
  253.  16h    WORD    location in directory (if high byte = FFh, low byte is device
  254.         ID)
  255.  18h    WORD    number of first cluster in file
  256.  1Ah    WORD    current absolute cluster number on disk
  257.  1Ch    WORD    current relative cluster number within file
  258.         (0 = first cluster of file, 1 = second cluster, etc.)
  259.  1Eh    BYTE    dirty flag (00h = not dirty)
  260.  1Fh    BYTE    unused
  261.  
  262. Format of reserved field for DOS 1.10-1.25:
  263. Offset    Size    Description
  264.  18h    BYTE    bit 7: set if logical device
  265.         bit 6: not dirty
  266.         bits 5-0: disk number or logical device ID
  267.  19h    WORD    starting cluster number on disk
  268.  1Bh    WORD    current absolute cluster number on disk
  269.  1Dh    WORD    current relative cluster number within file
  270.  1Fh    BYTE    unused
  271.  
  272. Format of reserved field for DOS 2.x:
  273. Offset    Size    Description
  274.  18h    BYTE    bit 7: set if logical device
  275.         bit 6: set if open???
  276.         bits 5-0: ???
  277.  19h    WORD    starting cluster number on disk
  278.  1Bh    WORD    ???
  279.  1Dh    BYTE    ???
  280.  1Eh    BYTE    ???
  281.  1Fh    BYTE    ???
  282.  
  283. Format of reserved field for DOS 3.x:
  284. Offset    Size    Description
  285.  18h    BYTE    number of system file table entry for file
  286.  19h    BYTE    attributes
  287.         bits 7,6: 00 = SHARE.EXE not loaded, disk file
  288.               01 = SHARE.EXE not loaded, character device
  289.               10 = SHARE.EXE loaded, remote file
  290.               11 = SHARE.EXE loaded, local file
  291.         bits 5-0: low six bits of device attribute word
  292. ---SHARE.EXE loaded, local file (DOS 3.x and 5.0)---
  293.  1Ah    WORD    starting cluster of file on disk
  294.  1Ch    WORD    (DOS 3.x) offset within SHARE of sharing record (see AH=52h)
  295.         (DOS 5.0) unique sequence number of sharing record
  296.  1Eh    BYTE    file attribute
  297.  1Fh    BYTE    ???
  298. ---SHARE.EXE loaded, remote file---
  299.  1Ah    WORD    number of sector containing directory entry
  300.  1Ch    WORD    relative cluster within file of last cluster accessed
  301.  1Eh    BYTE    absolute cluster number of last cluster accessed
  302.  1Fh    BYTE    ???
  303. ---SHARE.EXE not loaded---
  304.  1Ah    BYTE    (low byte of device attribute word AND 0Ch) OR open mode
  305.  1Bh    WORD    starting cluster of file
  306.  1Dh    WORD    number of sector containing directory entry
  307.  1Fh    BYTE    number of directory entry within sector
  308. Note:    if FCB opened on character device, DWORD at 1Ah is set to the address
  309.       of the device driver header, then the BYTE at 1Ah is overwritten.
  310. ----------2110-------------------------------
  311. INT 21 - DOS 1+ - CLOSE FILE USING FCB
  312.     AH = 10h
  313.     DS:DX -> File Control Block (see AH=0Fh)
  314. Return: AL = status
  315.         00h successful
  316.         FFh failed
  317. Notes:    a successful close forces all disk buffers used by the file to be
  318.       written and the directory entry to be updated
  319.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  320. SeeAlso: AH=0Fh,AH=16h,AH=3Eh
  321. ----------2111-------------------------------
  322. INT 21 - DOS 1+ - FIND FIRST MATCHING FILE USING FCB
  323.     AH = 11h
  324.     DS:DX -> unopened FCB (see AH=0Fh), may contain '?' wildcards
  325. Return: AL = status
  326.         00h successful
  327.         [DTA] unopened FCB for first matching file
  328.         FFh no matching filename, or bad FCB
  329. Notes:    the type of the returned FCB depends on whether the input FCB was a
  330.       normal or an extended FCB
  331.     for extended FCBs with search attribute 08h, the volume label (if any)
  332.       will be returned even if the current directory is not the root dir.
  333.     DOS 3+ also allows the '*' wildcard
  334.     the search FCB must not be modified if AH=12h will be used to continue
  335.       searching; DOS 3.3 has set the following parts of the FCB:
  336.          0Ch    BYTE    ???
  337.          0Dh    WORD    directory entry number of matching file
  338.          0Fh    WORD    cluster number of current directory
  339.          11h  4 BYTEs    ???
  340.          15h    BYTE    drive number (1=A:)
  341.     at least for DOS 3.3, the unopened FCB in the DTA is actually the drive
  342.       number followed by the file's directory entry
  343. SeeAlso: AH=12h,AH=1Ah,AH=4Eh,INT 2F/AX=111Bh
  344. ----------2112-------------------------------
  345. INT 21 - DOS 1+ - FIND NEXT MATCHING FILE USING FCB
  346.     AH = 12h
  347.     DS:DX -> unopened FCB (see AH=0Fh)
  348. Return: AL = status
  349.         00h successful
  350.         [DTA] = unopened FCB
  351.         FFh no more matching filenames
  352. Note:    (see AH=11h)
  353.     assumes that successful FindFirst executed on search FCB before call
  354. SeeAlso: AH=1Ah,AH=4Fh,INT 2F/AX=111Ch
  355. ----------2113-------------------------------
  356. INT 21 - DOS 1+ - DELETE FILE USING FCB
  357.     AH = 13h
  358.     DS:DX -> unopened FCB (see AH=0Fh), filename filled with template for
  359.         deletion ('?' wildcards allowed)
  360. Return: AL = status
  361.         00h one or more files successfully deleted
  362.         FFh no matching files or all were read-only or locked
  363. Notes:    DOS 1.25+ deletes everything in the current directory (including
  364.       subdirectories) and sets the first byte of the name to 00h (entry
  365.       never used) instead of E5h if called on an extended FCB with
  366.       filename '???????????' and bits 0-4 of the attribute set (bits 1 and
  367.       2 for DOS 1.x).  This may have originally been an optimization to
  368.       minimize directory searching after a mass deletion (DOS 1.25+ stop
  369.       the directory search upon encountering a never-used entry), but can
  370.       corrupt the filesystem under DOS 2+ because subdirectories are
  371.       removed without deleting the files they contain.
  372.     currently-open files should not be deleted
  373. SeeAlso: AH=41h,INT 2F/AX=1113h
  374. ----------2114-------------------------------
  375. INT 21 - DOS 1+ - SEQUENTIAL READ FROM FCB FILE
  376.     AH = 14h
  377.     DS:DX -> opened FCB (see AH=0Fh)
  378. Return: AL = status
  379.         00h successful
  380.         01h end of file (no data)
  381.         02h segment wrap in DTA
  382.         03h end of file, partial record read
  383.     [DTA] = record read from file
  384. Notes:    reads a record of the size specified in the FCB beginning at the
  385.       current file position, then updates the current block and current
  386.       record fields in the FCB
  387.     if a partial record was read, it is zero-padded to the full size
  388.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  389. SeeAlso: AH=0Fh,AH=15h,AH=1Ah,AH=3Fh,INT 2F/AX=1108h
  390. ----------2115-------------------------------
  391. INT 21 - DOS 1+ - SEQUENTIAL WRITE TO FCB FILE
  392.     AH = 15h
  393.     DS:DX -> opened FCB (see AH=0Fh)
  394.     [DTA] = record to write
  395. Return: AL = status
  396.         00h successful
  397.         01h disk full
  398.         02h segment wrap in DTA
  399. Notes:    writes a record of the size specified in the FCB beginning at the
  400.       current file position, then updates the current block and current
  401.       record fields in the FCB
  402.     if less than a full sector is written, the data is placed in a DOS
  403.       buffer to be written out at a later time
  404.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  405. SeeAlso: AH=0Fh,AH=14h,AH=1Ah,AH=40h,INT 2F/AX=1109h
  406. ----------2116-------------------------------
  407. INT 21 - DOS 1+ - CREATE OR TRUNCATE FILE USING FCB
  408.     AH = 16h
  409.     DS:DX -> unopened FCB (see AH=0Fh), wildcards not allowed
  410. Return: AL = status
  411.         00h successful
  412.         FFh directory full or file exists and is read-only or locked
  413. Notes:    if file already exists, it is truncated to zero length
  414.     if an extended FCB is used, the file is given the attribute in the
  415.       FCB; this is how to create a volume label in the disk's root dir
  416.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  417. SeeAlso: AH=0Fh,AH=10h,AH=3Ch
  418. ----------2117-------------------------------
  419. INT 21 - DOS 1+ - RENAME FILE USING FCB
  420.     AH = 17h
  421.     DS:DX -> modified FCB (see also AH=0Fh)
  422.         the old filename ('?' wildcards OK) is in the standard location
  423.         while the new filename ('?' wildcards OK) is stored in the 11
  424.         bytes beginning at offset 11h
  425. Return:    AL = status
  426.         00h successfully renamed
  427.         FFh no matching files,file is read-only, or new name already exists
  428. Note:    subdirectories may be renamed using an extended FCB with the
  429.       appropriate attribute, as may volume labels
  430. SeeAlso: AH=0Fh,AH=13h,AH=56h,INT 2F/AX=1111h
  431. ----------2118-------------------------------
  432. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  433.     AH = 18h
  434. Return: AL = 00h
  435. Note:    corresponds to the CP/M BDOS function "get bit map of logged drives",
  436.       which is meaningless under MSDOS
  437. SeeAlso: AH=1Dh,AH=1Eh,AH=20h,AX=4459h
  438. ----------2119-------------------------------
  439. INT 21 - DOS 1+ - GET CURRENT DEFAULT DRIVE
  440.     AH = 19h
  441. Return: AL = drive (00h = A:, 01h = B:, etc)
  442. SeeAlo: AH=0Eh,AH=47h
  443. ----------211A-------------------------------
  444. INT 21 - DOS 1+ - SET DISK TRANSFER AREA ADDRESS
  445.     AH = 1Ah
  446.     DS:DX -> Disk Transfer Area (DTA)
  447. Notes:    the DTA is set to PSP:0080h when a program is started
  448.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  449. SeeAlso: AH=11h,AH=12h,AH=2Fh,AH=4Eh,AH=4Fh
  450. ----------211B-------------------------------
  451. INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR DEFAULT DRIVE
  452.     AH = 1Bh
  453. Return: AL = sectors per cluster (allocation unit)
  454.     CX = bytes per sector
  455.     DX = total number of clusters
  456.     DS:BX -> media ID byte (see below)
  457. Note:    under DOS 1.x, DS:BX points at an actual copy of the FAT; later
  458.       versions return a pointer to a copy of the FAT's ID byte
  459. SeeAlso: AH=1Ch,AH=36h
  460.  
  461. Values for media ID byte:
  462.  FFh    floppy, double-sided, 8 sectors per track (320K)
  463.  FEh    floppy, single-sided, 8 sectors per track (160K)
  464.  FDh    floppy, double-sided, 9 sectors per track (360K)
  465.  FCh    floppy, single-sided, 9 sectors per track (180K)
  466.  F9h    floppy, double-sided, 15 sectors per track (1.2M)
  467.  F8h    hard disk
  468.  F0h    other
  469. ----------211C-------------------------------
  470. INT 21 - DOS 1+ - GET ALLOCATION INFORMATION FOR SPECIFIC DRIVE
  471.     AH = 1Ch
  472.     DL = drive (00h = default, 01h = A:, etc)
  473. Return: AL = sectors per cluster (allocation unit)
  474.     CX = bytes per sector
  475.     DX = total number of clusters
  476.     DS:BX -> media ID byte (see AH=1Bh)
  477. Note:    under DOS 1.x, DS:BX points at an actual copy of the FAT; later
  478.       versions return a pointer to a copy of the FAT's ID byte
  479. SeeAlso: AH=1Bh,AH=36h
  480. ----------211D-------------------------------
  481. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  482.     AH = 1Dh
  483. Return: AL = 00h
  484. Note:    corresponds to the CP/M BDOS function "get bit map of read-only
  485.       drives", which is meaningless under MSDOS
  486. SeeAlso: AH=18h,AH=1Eh,AH=20h,AX=4459h
  487. ----------211E-------------------------------
  488. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  489.     AH = 1Eh
  490. Return: AL = 00h
  491. Note:    corresponds to the CP/M BDOS function "set file attributes" which was
  492.      meaningless under MSDOS 1.x
  493. SeeAlso: AH=18h,AH=1Dh,AH=20h
  494. ----------211F-------------------------------
  495. INT 21 - DOS 1+ - GET DRIVE PARAMETER BLOCK FOR DEFAULT DRIVE
  496.     AH = 1Fh
  497. Return: AL = status
  498.         00h successful
  499.         DS:BX -> Drive Parameter Block (DPB) (see below for DOS 1.x,
  500.             AH=32h for DOS 2+)
  501.         FFh invalid drive
  502. Note:    this call was undocumented prior to the release of DOS 5.0; however,
  503.       only the DOS 4+ version of the DPB has been documented
  504. SeeAlso: AH=32h
  505.  
  506. Format of DOS 1.1 and MSDOS 1.25 drive parameter block:
  507. Offset    Size    Description
  508.  00h    BYTE    sequential device ID
  509.  01h    BYTE    logical drive number (0=A:)
  510.  02h    WORD    bytes per sector
  511.  04h    BYTE    highest sector number within a cluster
  512.  05h    BYTE    shift count to convert clusters into sectors
  513.  06h    WORD    starting sector number of first FAT
  514.  08h    BYTE    number of copies of FAT
  515.  09h    WORD    number of directory entries
  516.  0Bh    WORD    number of first data sector
  517.  0Dh    WORD    highest cluster number (number of data clusters + 1)
  518.  0Fh    BYTE    sectors per FAT
  519.  10h    WORD    starting sector of directory
  520.  12h    WORD    address of allocation table
  521. Note:    the DOS 1.0 table is the same except that the first and last fields
  522.       are missing; see INT 21/AH=32h for the DOS 2+ version
  523. ----------2120-------------------------------
  524. INT 21 - DOS 1+ - NULL FUNCTION FOR CP/M COMPATIBILITY
  525.     AH = 20h
  526. Return: AL = 00h
  527. Note:    corresponds to the CP/M BDOS function "get/set default user
  528.       (sublibrary) number", which is meaningless under MSDOS
  529. SeeAlso: AH=18h,AH=1Dh,AH=1Eh,AX=4459h
  530. ----------2121-------------------------------
  531. INT 21 - DOS 1+ - READ RANDOM RECORD FROM FCB FILE
  532.     AH = 21h
  533.     DS:DX -> opened FCB (see AH=0Fh)
  534. Return: AL = status
  535.         00h successful    
  536.         01h end of file, no data read
  537.         02h segment wrap in DTA, no data read
  538.         03h end of file, partial record read
  539.     [DTA] = record read from file
  540. Notes:    the record is read from the current file position as specified by the
  541.       random record and record size fields of the FCB
  542.     the file position is not updated after reading the record
  543.     if a partial record is read, it is zero-padded to the full size
  544.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  545. SeeAlso: AH=14h,AH=22h,AH=27h,AH=3Fh
  546. ----------2122-------------------------------
  547. INT 21 - DOS 1+ - WRITE RANDOM RECORD TO FCB FILE
  548.     AH = 22h
  549.     DS:DX -> opened FCB (see AH=0Fh)
  550.     [DTA] = record to write
  551. Return: AL = status
  552.         00h successful
  553.         01h disk full
  554.         02h segment wrap in DTA
  555. Notes:    the record is written to the current file position as specified by the
  556.       random record and record size fields of the FCB
  557.     the file position is not updated after writing the record
  558.     if the record is located beyond the end of the file, the file is
  559.       extended but the intervening data remains uninitialized
  560.     if the record only partially fills a disk sector, it is copied to a
  561.       DOS disk buffer to be written out to disk at a later time
  562.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  563. SeeAlso: AH=15h,AH=21h,AH=28h,AH=40h
  564. ----------2123-------------------------------
  565. INT 21 - DOS 1+ - GET FILE SIZE FOR FCB
  566.     AH = 23h
  567.     DS:DX -> unopened FCB (see AH=0Fh), wildcards not allowed
  568. Return: AL = status
  569.         00h successful (matching file found)
  570.         FCB random record field filled with size in records, rounded up
  571.         to next full record
  572.         FFh failed (no matching file found)
  573. Note:    not supported by MS Windows 3.0 DOSX.EXE DOS extender
  574. SeeAlso: AH=42h
  575. ----------2124-------------------------------
  576. INT 21 - DOS 1+ - SET RANDOM RECORD NUMBER FOR FCB
  577.     AH = 24h
  578.     DS:DX -> opened FCB (see AH=0Fh)
  579. Notes:    computes the random record number corresponding to the current record
  580.       number and record size, then stores the result in the FCB
  581.     normally used when switching from sequential to random access
  582.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  583. SeeAlso: AH=21h,AH=27h,AH=42h
  584. ----------2125-------------------------------
  585. INT 21 - DOS 1+ - SET INTERRUPT VECTOR
  586.     AH = 25h
  587.     AL = interrupt number
  588.     DS:DX -> new interrupt handler
  589. Notes:    this function is preferred over direct modification of the interrupt
  590.       vector table
  591.     some DOS extenders place an API on this function, as it is not
  592.       directly meaningful in protected mode
  593. SeeAlso: AX=2501h,AH=35h
  594. ----------212501-----------------------------
  595. INT 21 P - Phar Lap 386/DOS-Extender - RESET DOS EXTENDER DATA STRUCTURES 
  596.     AX = 2501h
  597.     SS = application's original SS or DS (FlashTek X-32VM)
  598. Return: CF clear if successful
  599.     CF set on error
  600.         caller is operating on X-32 stack (FlashTek X-32VM)
  601. Notes:    Phar Lap uses INT 21/AH=25h as the entry point for all 386/DOS-Extender
  602.       system calls.     Only available when directly using 386/DOS-Extender or
  603.       a compatible DOS extender, or when using a product that was created
  604.       using 386-DOS/Extender or a compatible
  605.     this function is also supported by FlashTek X-32VM
  606. SeeAlso: AH=30h"Phar Lap"
  607. ----------212502-----------------------------
  608. INT 21 - Phar Lap 386/DOS-Extender - GET PROTECTED-MODE INTERRUPT VECTOR
  609.     AX = 2502h
  610.     CL = interrupt number
  611. Return:    CF clear
  612.     ES:EBX = CS:EIP of protected-mode interrupt handler
  613. Note:    this function is also supported by FlashTek X-32VM
  614. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0204h
  615. ----------212503-----------------------------
  616. INT 21 - Phar Lap 386/DOS-Extender - GET REAL-MODE INTERRUPT VECTOR
  617.     AX = 2503h
  618.     CL = interrupt number
  619. Return: CF clear
  620.     EBX = CS:IP of real-mode interrupt handler
  621. Note:    this function is also supported by FlashTek X-32VM
  622. SeeAlso: AX=2502h,AX=2504h,AH=35h,INT 31/AX=0200h
  623. ----------212504-----------------------------
  624. INT 21 - Phar Lap 386/DOS-Extender - SET PROTECTED-MODE INTERRUPT VECTOR
  625.     AX = 2504h
  626.     CL = interrupt number
  627.     DS:EDX = CS:EIP of protected-mode interrupt handler
  628. Return: CF clear
  629. Note:    this function is also supported by FlashTek X-32VM
  630. SeeAlso: AX=2502h,AX=2505h,INT 31/AX=0205h
  631. ----------212505-----------------------------
  632. INT 21 - Phar Lap 386/DOS-Extender - SET REAL-MODE INTERRUPT VECTOR
  633.     AX = 2505h
  634.     CL = interrupt number
  635.     EBX = CS:IP of real-mode interrupt handler
  636. Return: CF clear
  637. Note:    this function is also supported by FlashTek X-32VM
  638. SeeAlso: AX=2503h,AX=2504h,INT 31/AX=0201h
  639. ----------212506-----------------------------
  640. INT 21 - Phar Lap 386/DOS-Extender - SET INT TO ALWAYS GAIN CONTRL IN PROT MODE
  641.     AX = 2506h
  642.     CL = interrupt number
  643.     DS:EDX = CS:EIP of protected-mode interrupt handler
  644. Return: CF clear
  645. Notes:    this function modifies both the real-mode low-memory interrupt
  646.       vector table and the protected-mode Interrupt Descriptor Table (IDT)
  647.     interrupts occurring in real mode are resignaled in protected mode
  648.     this function is also supported by FlashTek X-32VM
  649. ----------212507-----------------------------
  650. INT 21 - Phar Lap 386/DOS-Extender - SET REAL- & PROTECTED-MODE INT VECTORS
  651.     AX = 2507h
  652.     CL = interrupt numbern
  653.     DS:EDX = CS:EIP of protected-mode interrupt handler
  654.     EBX = CS:IP of real-mode interrupt handler
  655. Return: CF clear
  656. Notes:    interrupts are disabled until both vectors have been modified
  657.     this function is also supported by FlashTek X-32VM
  658. SeeAlso: AX=2504h,AX=2505h
  659. ----------212508-----------------------------
  660. INT 21 - Phar Lap 386/DOS-Extender - GET SEGMENT LINEAR BASE ADDRESS
  661.     AX = 2508h
  662.     BX = segment selector
  663. Return: CF clear if successful
  664.         ECX = linear base address of segment
  665.     CF set if invalid segment selector
  666. Note:    this function is also supported by FlashTek X-32VM
  667. SeeAlso: AX=2509h
  668. ----------212509-----------------------------
  669. INT 21 - Phar Lap 386/DOS-Extender - CONVERT LINEAR TO PHYSICAL ADDRESS
  670.     AX = 2509h
  671.     EBX = linear address to convert
  672. Return: CF clear if successful
  673.         ECX = physical address (carry flag clear)
  674.     CF set if linear address not mapped in page tables
  675. SeeAlso: AX=2508h
  676. ----------212509-----------------------------
  677. INT 21 - FlashTek X-32VM - GET SYSTEM SEGMENTS AND SELECTORS
  678.     AX = 2509h
  679. Return: CF clear
  680.     EAX high word = default DS
  681.     AX = alias for 16-bit data segment
  682.     BX = real mode code segment
  683.     EDX high word = selector covering full 4GB address space
  684.     DX = default SS
  685.     ESI high word = PSP selector
  686.     SI = environment selector
  687. ----------21250A-----------------------------
  688. INT 21 - Phar Lap 386/DOS-Extender - MAP PHYSICAL MEMORY AT END OF SEGMENT
  689.     AX = 250Ah
  690.     ES = segment selector in the Local Descriptor Table (LDT) of segment
  691.          to modify
  692.     EBX = physical base address of memory to map (multiple of 4K)
  693.     ECX = number of physical 4K pages to map
  694. Return: CF clear if successful
  695.         EAX = 32-bit offset in segment of mapped memory
  696.     CF set on error
  697.         EAX = error code
  698.         08h insufficient memory to create page tables
  699.         09h invalid segment selector
  700. SeeAlso: INT 31/AX=0800h
  701. ----------21250C-----------------------------
  702. INT 21 - Phar Lap 386/DOS-Extender - GET HARDWARE INTERRUPT VECTORS
  703.     AX = 250Ch
  704. Return: CF clear
  705.     AL = base interrupt vector for IRQ0-IRQ7
  706.     AH = base interrupt vector for IRQ8-IRQ15
  707.     BL = interrupt vector for BIOS print screen function (Phar Lap only)
  708. Note:    this function is also supported by FlashTek X-32VM
  709. SeeAlso: INT 31/AX=0400h,INT 67/AX=DE0Ah
  710. ----------21250D-----------------------------
  711. INT 21 - Phar Lap 386/DOS-Extender - GET REAL-MODE LINK INFORMATION
  712.     AX = 250Dh
  713. Return: CF clear
  714.     EAX = CS:IP of real-mode callback procedure that will call through
  715.         from real mode to a protected-mode routine
  716.     EBX = 32-bit real-mode address of intermode call data buffer
  717.     ECX = size in bytes of intermode call data buffer
  718.     ES:EDX = protected-mode address of intermode call data buffer
  719. Notes:    this function is also supported by FlashTek X-32VM
  720.     X-32VM guarantees the intermode buffer to be at least 4 KB
  721. SeeAlso: AX=250Eh
  722.  
  723. Call real-mode callback with:
  724.     STACK:    DWORD    offset to protected-mode code
  725.         WORD    placeholder for protected-mode CS
  726.         DWORD    pointer to selector structure (see below)
  727.             or 0000h:0000h for defaults
  728.         var    parameters for protected-mode procedure
  729. Return: via FAR return
  730.  
  731. Format of selector structure:
  732. Offset    Size    Description
  733.  00h    WORD    protected-mode GS selector
  734.  02h    WORD    protected-mode FS selector
  735.  04h    WORD    protected-mode ES selector
  736.  06h    WORD    protected-mode DS selector
  737. ----------21250E-----------------------------
  738. INT 21 - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE
  739.     AX = 250Eh
  740.     EBX = CS:IP of real-mode procedure to call
  741.     ECX = number of two-byte words to copy from protected-mode stack
  742.           to real-mode stack
  743. Return: CF clear if successful
  744.         all segment registers unchanged
  745.         all general registers contain values set by real-mode procedure
  746.         all other flags set as they were left by real-mode procedure
  747.         stack unchanged
  748.     CF set on error
  749.         EAX = error code
  750.         01h not enough real-mode stack space
  751. Note:    this function is also supported by FlashTek X-32VM; under X-32VM, the
  752.       call will fail if ECX > 0000003Fh
  753. SeeAlso: AX=250Dh,AX=2510h,AH=E1h"OS/286",INT 31/AX=0301h
  754. ----------21250F-----------------------------
  755. INT 21 - Phar Lap 386/DOS-Extender - CONVERT PROTECTED-MODE ADDRESS TO MS-DOS
  756.     AX = 250Fh
  757.     ES:EBX = 48-bit protected-mode address to convert
  758. Return: CF clear if successful (address < 1MB)
  759.         ECX = 32-bit real-mode MS-DOS address
  760.     CF set on error (address >= 1MB)
  761.         ECX = linear address
  762. Note:    this function is also supported by FlashTek X-32VM
  763. SeeAlso: AX=2510h
  764. ----------212510-----------------------------
  765. INT 21 - Phar Lap 386/DOS-Extender - CALL REAL-MODE PROCEDURE, REGISTERS
  766.     AX = 2510h
  767.     EBX = CS:IP of real-mode procedure to call
  768.     ECX = number of two-byte words to copy to protected-mode stack to
  769.           real-mode stack
  770.     DS:EDX -> pointer to parameter block (see below)
  771. Return: CF clear if successful
  772.         all segment registers unchanged,
  773.         EDX unchanged
  774.         all other general registers contain values set by real-mode proc
  775.         all other flags are set as they were left by real-mode procedure
  776.         real-mode register values are returned in the parameter block
  777.     CF set on error
  778.         EAX = error code
  779.         01h not enough real-mode stack space
  780. Note:    unlike most of the preceding 25xxh functions, this one is not
  781.       supported by FlashTek X-32VM
  782. SeeAlso: AX=250Eh,AX=250Fh
  783.  
  784. Format of parameter block:
  785. Offset    Size    Description
  786.  00h    WORD    real-mode DS value
  787.  02h    WORD    real-mode ES value
  788.  04h    WORD    real-mode FS value
  789.  06h    WORD    real-mode GS value
  790.  08h    DWORD    real-mode EAX value
  791.  0Ch    DWORD    real-mode EBX value
  792.  10h    DWORD    real-mode ECX value
  793.  14h    DWORD    real-mode EDX value
  794. ----------212511-----------------------------
  795. INT 21 - Phar Lap 386/DOS-Extender - ISSUE REAL-MODE INTERRUPT
  796.     AX = 2511h
  797.     DS:EDX -> parameter block (see below)
  798. Return: all segment registers unchanged
  799.     EDX unchanged
  800.     all other registers contain values set by the real-mode int handler
  801.     the flags are set as they were left by the real-mode interrupt handler
  802.     real-mode register values are returned in the parameter block
  803. Note:    this function is also supported by FlashTek X-32VM
  804. SeeAlso: AX=2503h,AX=2505h,AX=250Eh,AH=E3h"OS/286",INT 31/AX=0300h
  805.  
  806. Format of parameter block:
  807. Offset    Size    Description
  808.  00h    WORD    interrupt number
  809.  02h    WORD    real-mode DS value
  810.  04h    WORD    real-mode ES value
  811.  06h    WORD    real-mode FS value
  812.  08h    WORD    real-mode GS value
  813.  0Ah    DWORD    real-mode EAX value
  814.  0Eh    DWORD    real-mode EDX value
  815. Note: all other real-mode values set from protected-mode registers
  816. ----------212512-----------------------------
  817. INT 21 - Phar Lap 386/DOS-Extender - LOAD PROGRAM FOR DEBUGGING
  818.     AX = 2512h
  819.     DS:EDX -> pointer to ASCIIZ program name
  820.     ES:EBX -> pointer to parameter block (see below)
  821.     ECX = size in bytes of LDT buffer
  822. Return: CF clear if successful
  823.         EAX = number of segment descriptors in LDT
  824.     CF set on error
  825.         EAX = error code
  826.         02h file not found or path invalid
  827.         05h access denied
  828.         08h insufficient memory
  829.         0Ah environment invalid
  830.         0Bh invalid file format
  831.         80h LDT too small
  832.  
  833. Format of parameter block:
  834. Offset    Size    Description
  835. Input:
  836.  00h    DWORD    32-bit offset of environment string
  837.  04h    WORD    segment of environment string
  838.  06h    DWORD    32-bit offset of command-tail string
  839.  0Ah    WORD    segment of command-tail string
  840.  0Ch    DWORD    32-bit offset of LDT buffer (size in ECX)
  841.  10h    WORD    segment of LDT buffer
  842. Output:
  843.  12h    WORD    real-mode paragraph address of PSP (see also AH=26h)
  844.  14h    WORD    real/protected mode flag
  845.         0000h  real mode
  846.         0001h  protected mode
  847.  16h    DWORD    initial EIP value
  848.  1Ah    WORD    initial CS value
  849.  1Ch    DWORD    initial ESP value
  850.  20h    WORD    initial SS value
  851.  22h    WORD    initial DS value
  852.  24h    WORD    initial ES value
  853.  26h    WORD    initial FS value
  854.  28h    WORD    initial GS value
  855. ----------212513-----------------------------
  856. INT 21 - Phar Lap 386/DOS-Extender - ALIAS SEGMENT DESCRIPTOR
  857.     AX = 2513h
  858.     BX = segment selector of descriptor in GDT or LDT
  859.     CL = access-rights byte for alias descriptor
  860.     CH = use-type bit (USE16 or USE32) for alias descriptor
  861. Return: CF clear if successful
  862.         AX = segment selector for created alias
  863.     CF set on error
  864.         EAX = error code
  865.         08h insufficient memory (can't grow LDT)
  866.         09h invalid segment selector in BX
  867. ----------212514-----------------------------
  868. INT 21 - Phar Lap 386/DOS-Extender - CHANGE SEGMENT ATTRIBUTES
  869.     AX = 2514h
  870.     BX = segment selector of descriptor in GDT or LDT
  871.     CL = new access-rights byte 
  872.     CH = new use-type bit (USE16 or USE32)
  873. Return: CF clear if successful
  874.     CF set on error
  875.         EAX = error code
  876.         09h invalid selector in BX
  877. SeeAlso: AX=2515h,INT 31/AX=0009h
  878. ----------212515-----------------------------
  879. INT 21 - Phar Lap 386/DOS-Extender - GET SEGMENT ATTRIBUTES
  880.     AX = 2515h
  881.     BX = segment selector of descriptor in GDT or LDT
  882. Return: CF clear if successful
  883.         CL = access-rights byte for segment
  884.         CH = use-type bit (USE16 or USE32)
  885.     ECX<16-31> destroyed
  886.     CF set on error
  887.         EAX = error code
  888.         09h invalid segment selector in BX
  889. SeeAlso: AX=2514h
  890. ----------212516-----------------------------
  891. INT 21 - Phar Lap 386/DOS-Extender - FREE ALL MEMORY OWNED BY LDT
  892.     AX = 2516h
  893.     ???
  894. Return: ???
  895. ----------212517-----------------------------
  896. INT 21 - Phar Lap 386/DOS-Extender - GET INFO ON DOS DATA BUFFER
  897.     AX = 2517h
  898.     ???
  899. Return: ???
  900. ----------212518-----------------------------
  901. INT 21 - Phar Lap 386/DOS-Extender - SPECIFY HANDLER FOR MOVED SEGMENTS
  902.     AX = 2518h
  903.     ???
  904. Return: ???
  905. ----------212519-----------------------------
  906. INT 21 - Phar Lap 386/DOS-Extender VMM - GET ADDITIONAL MEMORY ERROR INFO
  907.     AX = 2519h
  908. Return: CF clear
  909.     EAX = error code
  910.         0000h  no error
  911.         0001h  out of physical memory
  912.         0002h  out of swap space (unable to grow swap file)
  913.         0003h  out of LDT entries and unable to grow LDT
  914.         0004h  unable to change extended memory allocation mark
  915.         FFFFFFFFh    paging disabled
  916. Note:    VMM is the Virtual Memory Manager option
  917. ----------21251A-----------------------------
  918. INT 21 - Phar Lap 386/DOS-Extender VMM - LOCK PAGES IN MEMORY
  919.     AX = 251Ah
  920.     EDX = number of 4k pages to lock
  921.     if BL = 00h
  922.         ECX = linear address of first page to lock
  923.     if BL = 01h
  924.         ES:ECX -> pointer to first page to lock
  925. Return: CF clear if successful
  926.     CF set on error
  927.         EAX = error code
  928.         08h insufficient memory
  929.         09h invalid address range
  930. SeeAlso: AX=251Bh,AX=EB06h,INT 31/AX=0600h
  931. ----------21251B-----------------------------
  932. INT 21 - Phar Lap 386/DOS-Extender VMM - UNLOCK PAGES
  933.     AX = 251Bh
  934.     EDX = number of pages to unlock
  935.     if BL = 00h
  936.         ECX = linear address of first page to unlock
  937.     if BL = 01h
  938.         ES:ECX -> pointer to first page to unlock
  939. Return: CF clear if successful
  940.     CF set on error
  941.         EAX = error code
  942.         09h invalid address range
  943. SeeAlso: AX=251Ah,AX=EB07h,INT 31/AX=0601h
  944. ----------21251D-----------------------------
  945. INT 21 - Phar Lap 386/DOS-Extender VMM - READ PAGE-TABLE ENTRY
  946.     AX = 251Dh
  947.     ???
  948. Return: ???
  949. SeeAlso: AX=251Eh,AX=EB00h,INT 31/AX=0506h
  950. ----------21251E-----------------------------
  951. INT 21 - Phar Lap 386/DOS-Extender VMM - WRITE PAGE-TABLE ENTRY
  952.     AX = 251Eh
  953.     ???
  954. Return: ???
  955. SeeAlso: AX=251Dh,INT 31/AX=0507h
  956. ----------21251F-----------------------------
  957. INT 21 - Phar Lap 386/DOS-Extender VMM - EXHANGE TWO PAGE-TABLE ENTRIES
  958.     AX = 251Fh
  959.     ???
  960. Return: ???
  961. SeeAlso: AX=251Dh,AX=251Eh
  962. ----------212520-----------------------------
  963. INT 21 - Phar Lap 386/DOS-Extender VMM - GET MEMORY STATISTICS
  964.     AX = 2520h
  965.     DS:EDX -> pointer to buffer at least 100 bytes in size (see below)
  966.     BL = 0 (don't reset VM stats), 1 (reset VM stats)
  967. Return: carry flag clear    
  968.  
  969. Format of VM stats buffer:
  970. Offset    Size    Description
  971.  00h    DWORD    VM status
  972.         0001h VM subsystem is present
  973.         0000h VM not present
  974.  04h    DWORD    "nconvpg" number of conventional memory pages available
  975.  08h    DWORD    "nbimpg" number of Compaq built-in memory pages available
  976.  0Ch    DWORD    "nextpg" total number of extended memory pages
  977.  10h    DWORD    "extlim" extender memory pages limit
  978.  14h    DWORD    "aphyspg" number of physical memory pages allocated to appl
  979.  18h    DWORD    "alockpg" number of locked pages owned by application
  980.  1Ch    DWORD    "sysphyspg" number physical memory pages allocated to system
  981.  20h    DWORD    "nfreepg" number of free physical pages; approx if EMS VCPI
  982.  24h    DWORD    linear address of beginning of application address space
  983.  28h    DWORD    linear address of end of application address space
  984.  2Ch    DWORD    number of seconds since last time VM stats were reset
  985.  30h    DWORD    number of page faults since last time
  986.  34h    DWORD    number of pages written to swap file since last time
  987.  38h    DWORD    number of reclaimed pages (page faults on swapped pages)
  988.  3Ch    DWORD    number of virtual pages allocated to the application
  989.  40h    DWORD    size in pages of swap file
  990.  44h    DWORD    number of system pages allocated with EMS calls
  991.  48h    DWORD    minimum number of conventional memory pages
  992.  4Ch    DWORD    maximum size in bytes to which swap file can be increased
  993.  50h    DWORD    "vmflags" bit 0 = 1 if page fault in progress
  994.  54h 16 BYTEs    reserved for future expansion (set to zero)
  995. ----------212521-----------------------------
  996. INT 21 - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S EXTENDED MEMORY USAGE
  997.     AX = 2521h
  998.     EBX = max 4k pages of physical extended memory which program may use
  999. Return: CF clear if successful
  1000.        EBX = maximum limit in pages
  1001.        ECX = minimum limit in pages
  1002.     CF set on error
  1003.         EAX = error code
  1004.         08h insufficient memory or -nopage switch used
  1005. SeeAlso: AX=2522h
  1006. ----------212522-----------------------------
  1007. INT 21 - Phar Lap 386/DOS-Extender VMM - SPECIFY ALTERNATE PAGE-FAULT HANDLER
  1008.     AX = 2522h
  1009.     ???
  1010. Return: ???
  1011. SeeAlso: AX=2523h
  1012. ----------212523-----------------------------
  1013. INT 21 - Phar Lap 386/DOS-Extender VMM - SPECIFY OUT-OF-SWAP-SPACE HANDLER
  1014.     AX = 2523h
  1015.     ???
  1016. Return: ???
  1017. SeeAlso: AX=2522h
  1018. ----------212524-----------------------------
  1019. INT 21 - Phar Lap 386/DOS-Extender VMM - INSTALL PAGE-REPLACEMENT HANDLERS
  1020.     AX = 2524h
  1021.     ???
  1022. Return: ???
  1023. ----------212525-----------------------------
  1024. INT 21 - Phar Lap 386/DOS-Extender VMM - LIMIT PROGRAM'S CONVENTIONAL MEM USAGE
  1025.     AX = 2525h
  1026.     EBX = limit in 4k pages of physical conventional memory which program 
  1027.           may use
  1028. Return: CF clear if successful
  1029.         EBX = maximum limit in pages
  1030.         ECX = minimum limit in pages
  1031.     CF set on error
  1032.         EAX = error code
  1033.         08h insufficient memory or -nopage switch used
  1034. SeeAlso: AX=2521h
  1035. ----------212526-----------------------------
  1036. INT 21 - Phar Lap 386/DOS-Extender - GET CONFIGURATION INFORMATION
  1037.     AX = 2526h
  1038.     ???
  1039. Return: ???
  1040. ----------21252B-----------------------------
  1041. INT 21 - FlashTek X-32VM - VIRTUAL MEMORY MANAGEMENT - PAGE LOCKING
  1042.     AX = 252Bh
  1043.     BH = function
  1044.         05h lock pages
  1045.         06h unlock pages
  1046.     BL = address type
  1047.         00h linear address
  1048.         ECX = linear start address of memory region
  1049.         01h segmented address
  1050.         ES:ECX -> start of memory region
  1051.     EDX = size of memory region in bytes
  1052. Return: CF clear if successful
  1053.     CF set on error
  1054. Note:    if X-32 is not using virtual memory, this function always succeeds
  1055. ----------212532-----------------------------
  1056. INT 21 - FlashTek X-32VM - GET EXCEPTION HANDLER VECTOR
  1057.     AX = 2532h
  1058.     CL = exception number (00h-0Fh)
  1059. Return: CF clear if successful
  1060.         ES:EBX = CS:EIP of current exception handler
  1061.     CF set on error (CL > 0Fh)
  1062. SeeAlso: AX=2533h
  1063. ----------212533-----------------------------
  1064. INT 21 - FlashTek X-32VM - SET EXCEPTION HANDLER VECTOR
  1065.     AX = 2533h
  1066.     CL = exception number (00h-0Fh)
  1067.     DS:EDX = CS:EIP of new exception handler
  1068. Return: CF clear if successful
  1069.     CF set on error (CL > 0Fh)
  1070. SeeAlso: AX=2532h
  1071. ----------2125C0-----------------------------
  1072. INT 21 - Phar Lap 386/DOS-Extender - ALLOCATE MS-DOS MEMORY BLOCK
  1073.     AX = 25C0h
  1074.     BX = number of 16-byte paragraphs of MS-DOS memory requested
  1075. Return: CF clear if successful
  1076.         AX = real-mode paragraph address of memory
  1077.     CF set on error
  1078.         AX = error code
  1079.         07h MS-DOS memory control blocks destroyed
  1080.         08h insufficient memory
  1081.         BX = size in paragraphs of largest available memory block
  1082. SeeAlso: AX=25C1h,AX=25C2h
  1083. ----------2125C1-----------------------------
  1084. INT 21 - Phar Lap 386/DOS-Extender - RELEASE MS-DOS MEMORY BLOCK
  1085.     AX = 25C1h
  1086.     CX = real-mode paragraph address of memory block to free
  1087. Return: CF clear if successful
  1088.         EAX destroyed
  1089.     CF set on error
  1090.         AX = error code
  1091.         07h MS-DOS memory control blocks destroyed
  1092.         09h invalid memory block address in CX
  1093. SeeAlso: AX=25C0h,AX=25C2h
  1094. ----------2125C2-----------------------------
  1095. INT 21 - Phar Lap 386/DOS-Extender - MODIFY MS-DOS MEMORY BLOCK
  1096.     AX = 25C2h
  1097.     BX = new requested block size in paragraphs
  1098.     CX = real-mode paragraph address of memory block to modify
  1099. Return: CF clear if successful
  1100.         EAX destroyed
  1101.     CF set on error
  1102.         AX = error code
  1103.         07h MS-DOS memory control blocks destroyed
  1104.         08h insufficient memory
  1105.         09h invalid memory block address in CX
  1106.         BX = size in paragraphs of largest available memory block
  1107. SeeAlso: AX=25C0h,AX=25C1h
  1108. ----------2125C3-----------------------------
  1109. INT 21 - Phar Lap 386/DOS-Extender - EXECUTE PROGRAM
  1110.     AX = 25C3h
  1111.     ES:EBX -> pointer to parameter block (see below)
  1112.     DS:EDX -> pointer to ASCIIZ program filename
  1113. Return: CF clear if successful
  1114.         all registers unchanged
  1115.     CF set on error
  1116.         EAX = error code
  1117.         01h function code in AL is invalid ???
  1118.         02h file not found or path invalid
  1119.         05h access denied
  1120.         08h insufficient memory to load program
  1121.         0Ah environment invalid
  1122.         0Bh invalid file format
  1123.  
  1124. Format of parameter block:
  1125. Offset    Size    Description
  1126.  00h    DWORD    32-bit offset of environment string
  1127.  04h    WORD    segment selector of environment string
  1128.  06h    DWORD    32-bit offset of command-tail string
  1129.  0Ah    WORD    segment selector of command-tail string
  1130. ----------2126-------------------------------
  1131. INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
  1132.     AH = 26h
  1133.     DX = segment at which to create PSP (see below)
  1134. Notes:    new PSP is updated with memory size information; INTs 22h, 23h, 24h
  1135.       taken from interrupt vector table
  1136.     (DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
  1137.       copy
  1138. SeeAlso: AH=4Bh,AH=50h,AH=51h,AH=55h,AH=62h,AH=67h
  1139.  
  1140. Format of PSP:
  1141. Offset    Size    Description
  1142.  00h  2 BYTEs    INT 20 instruction for CP/M CALL 0 program termination
  1143.         the CDh 20h here is often used as a signature for a valid PSP
  1144.  02h    WORD    segment of first byte beyond memory allocated to program
  1145.  04h    BYTE    unused filler
  1146.  05h    BYTE    CP/M CALL 5 service request (FAR JMP to 000C0h)
  1147.         BUG: (DOS 2+) PSPs created by INT 21/AH=4Bh point at 000BEh
  1148.  06h    WORD    CP/M compatibility--size of first segment for .COM files
  1149.  08h  2 BYTEs    remainder of FAR JMP at 05h
  1150.  0Ah    DWORD    stored INT 22 termination address
  1151.  0Eh    DWORD    stored INT 23 control-Break handler address
  1152.  12h    DWORD    DOS 1.1+ stored INT 24 critical error handler address
  1153.  16h    WORD    segment of parent PSP
  1154.  18h 20 BYTEs    DOS 2+ Job File Table, one byte per file handle, FFh = closed
  1155.  2Ch    WORD    DOS 2+ segment of environment for process
  1156.  2Eh    DWORD    DOS 2+ process's SS:SP on entry to last INT 21 call
  1157.  32h    WORD    DOS 3+ number of entries in JFT (default 20)
  1158.  34h    DWORD    DOS 3+ pointer to JFT (default PSP:0018h)
  1159.  38h    DWORD    DOS 3+ pointer to previous PSP (default FFFFFFFFh in 3.x)
  1160.         used by SHARE in DOS 3.3
  1161.  3Ch  4 BYTEs    unused by DOS versions <= 5.00
  1162.         reportedly used by Novell NetWare shell 3.x
  1163.  40h  2 BYTEs    DOS 5.0 version to return on INT 21/AH=30h
  1164.  42h  6 BYTEs    unused by DOS versions <= 5.00
  1165.  48h    BYTE    (MSWindows3) bit 0 set if non-Windows application (WINOLDAP)
  1166.  49h  7 BYTEs    unused by DOS versions <= 5.00
  1167.  50h  3 BYTEs    DOS 2+ service request (INT 21/RETF instructions)
  1168.  53h  9 BYTEs    unused in DOS versions <= 5.00
  1169.  5Ch 16 BYTEs    first default FCB, filled in from first commandline argument
  1170.         overwrites second FCB if opened
  1171.  6Ch 16 BYTEs    second default FCB, filled in from second commandline argument
  1172.         overwrites beginning of commandline if opened
  1173.  7Ch  4 BYTEs    unused
  1174.  80h 128 BYTEs    commandline / default DTA
  1175.         command tail is BYTE for length of tail, N BYTEs for the tail,
  1176.         followed by a BYTE containing 0Dh
  1177. Notes:    in DOS versions 3.0 and up, the limit on simultaneously open files may
  1178.       be increased by allocating memory for a new open file table, filling
  1179.       it with FFh, copying the first 20 bytes from the default table, and
  1180.       adjusting the pointer and count at 34h and 32h.  However, DOS
  1181.       versions through  at least 3.30 will only copy the first 20 file
  1182.       handles into a child PSP (including the one created on EXEC).
  1183.     network redirectors based on the original MS-Net implementation use
  1184.       values of 80h-FEh in the open file table to indicate remote files;
  1185.       Novell NetWare reportedly also uses values of 80h-FEh
  1186.     MSDOS 5.00 incorrectly fills the FCB fields when loading a program
  1187.       high; the first FCB is empty and the second contains the first
  1188.       parameter
  1189.     some DOS extenders place protected-mode values in various PSP fields
  1190.       such as the "parent" field, which can confuse PSP walkers.  Always
  1191.       check either for the CDh 20h signature or that the suspected PSP is
  1192.       at the beginning of a memory block which owns itself (the preceding
  1193.       paragraph should be a valid MCB with "owner" the same as the
  1194.       suspected PSP).
  1195.  
  1196. Format of environment block:
  1197. Offset    Size    Description
  1198.  00h  N BYTEs    first environment variable, ASCIZ string of form "var=value"
  1199.       N BYTEs    second environment variable, ASCIZ string
  1200.     ...
  1201.       N BYTEs    last environment variable, ASCIZ string of form "var=value"
  1202.     BYTE    00h
  1203. ---DOS 3+---
  1204.     WORD    number of strings following environment (normally 1)
  1205.       N BYTEs    ASCIZ full pathname of program owning this environment
  1206.         other strings may follow
  1207. ----------2127-------------------------------
  1208. INT 21 - DOS 1+ - RANDOM BLOCK READ FROM FCB FILE
  1209.     AH = 27h
  1210.     CX = number of records to read
  1211.     DS:DX -> opened FCB (see AH=0Fh)
  1212. Return: AL = status
  1213.         00h successful, all records read
  1214.         01h end of file, no data read
  1215.         02h segment wrap in DTA, no data read
  1216.         03h end of file, partial read
  1217.     [DTA] = records read from file
  1218.     CX = number of records read (return AL = 00h or 03h)
  1219. Notes:    read begins at current file position as specified in FCB; the file
  1220.       position is updated after reading
  1221.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1222. SeeAlso: AH=21h,AH=28h,AH=3Fh
  1223. ----------2128-------------------------------
  1224. INT 21 - DOS 1+ - RANDOM BLOCK WRITE TO FCB FILE
  1225.     AH = 28h
  1226.     CX = number of records to write
  1227.     DS:DX -> opened FCB (see AH=0Fh)
  1228.     [DTA] = records to write
  1229. Return: AL = status
  1230.         00h successful
  1231.         01h disk full or file read-only
  1232.         02h segment wrap in DTA
  1233.     CX = number of records written
  1234. Notes:    write begins at current file position as specified in FCB; the file
  1235.       position is updated after writing
  1236.     if CX = 0000h on entry, no data is written; instead the file size is
  1237.       adjusted to be the same as the file position specified by the random
  1238.       record and record size fields of the FCB
  1239.     if the data to be written is less than a disk sector, it is copied into
  1240.       a DOS disk buffer, to be written out to disk at a later time
  1241.     not supported by MS Windows 3.0 DOSX.EXE DOS extender
  1242. SeeAlso: AH=22h,AH=27h,AH=40h,AH=59h
  1243. ----------2129-------------------------------
  1244. INT 21 - DOS 1+ - PARSE FILENAME INTO FCB
  1245.     AH = 29h
  1246.     AL = parsing options
  1247.         bit 0: skip leading separators
  1248.         bit 1: use existing drive number in FCB if no drive is specified,
  1249.            instead of setting field to zero
  1250.         bit 2: use existing filename in FCB if no base name is specified,
  1251.            instead of filling field with blanks
  1252.         bit 3: use existing extension in FCB if no extension is specified,
  1253.            instead of filling field with blanks
  1254.         bits 4-7: reserved (0)
  1255.     DS:SI -> filename string (both '*' and '?' wildcards OK)
  1256.     ES:DI -> buffer for unopened FCB
  1257. Return: AL = result code
  1258.         00h successful parse, no wildcards encountered
  1259.         01h successful parse, wildcards present
  1260.         FFh failed (invalid drive specifier)
  1261.     DS:SI -> first unparsed character
  1262.     ES:DI buffer filled with unopened FCB (see AH=0Fh)
  1263. Notes:    asterisks expanded to question marks in the FCB
  1264.     all processing stops when a filename terminator is encountered
  1265.     cannot be used with filespecs which include a path (DOS 2+)
  1266. SeeAlso: AH=0Fh,AH=16h,AH=26h
  1267. ----------212A-------------------------------
  1268. INT 21 - DOS 1+ - GET SYSTEM DATE
  1269.     AH = 2Ah
  1270. Return: CX = year (1980-2099)
  1271.     DH = month
  1272.     DL = day
  1273. ---DOS 1.10+---
  1274.     AL = day of week (00h=Sunday)
  1275. SeeAlso: AH=2Bh"DOS",AH=2Ch,AH=E7h,INT 1A/AH=04h,INT 2F/AX=120Dh
  1276. ----------212B-------------------------------
  1277. INT 21 - DOS 1+ - SET SYSTEM DATE
  1278.     AH = 2Bh
  1279.     CX = year (1980-2099)
  1280.     DH = month
  1281.     DL = day
  1282. Return: AL = status
  1283.         00h successful
  1284.         FFh invalid date, system date unchanged
  1285. Note:    DOS 3.3+ also sets CMOS clock
  1286. SeeAlso: AH=2Ah,AH=2Dh,INT 1A/AH=05h
  1287. ----------212B--CX4149-----------------------
  1288. INT 21 - AI Architects - ??? - INSTALLATION CHECK
  1289.     AH = 2Bh
  1290.     CX = 4149h ('AI')
  1291.     DX = 413Fh ('A?')
  1292. Return: AL <> FFh if installed
  1293. Note:    Borland's TKERNEL makes this call
  1294. ----------212B--CX4358-----------------------
  1295. INT 21 - PC Tools v5.x PC-Cache - INSTALLATION CHECK
  1296.     AH = 2Bh
  1297.     CX = 4358h ('CX')
  1298. Return: AL = FFh if PC-Cache not installed
  1299.     AL = 00h if installed
  1300.         CX = 6378h ('cx')
  1301.         BX = ???
  1302.         DX = ???
  1303. SeeAlso: INT 16/AX=FFA5h/CX=1111h
  1304. ----------212B--CX4445-----------------------
  1305. INT 21 - DESQview - INSTALLATION CHECK
  1306.     AH = 2Bh
  1307.     CX = 4445h ('DE')
  1308.     DX = 5351h ('SQ')
  1309.     AL = subfunction (DV v2.00+)
  1310.         01h get version
  1311.         Return: BX = version (BH = major, BL = minor)
  1312.         Note: early copies of v2.00 return 0002h
  1313.         02h get shadow buffer info, and start shadowing
  1314.         Return: BH = rows in shadow buffer
  1315.             BL = columns in shadow buffer
  1316.             DX = segment of shadow buffer
  1317.         04h get shadow buffer info
  1318.         Return: BH = rows in shadow buffer
  1319.             BL = columns in shadow buffer
  1320.             DX = segment of shadow buffer
  1321.         05h stop shadowing
  1322. Return: AL = FFh if DESQview not installed
  1323. Notes:    in DESQview v1.x, there were no subfunctions; this call only identified
  1324.       whether or not DESQview was loaded.  DESQview v2.52 performs function
  1325.       01h for all subfunction requests 0Ch and higher and appears to ignore
  1326.       all lower-numbered functions not listed here.
  1327.     DESQview versions 2.5x are part of DESQview/X v1.0x.
  1328. BUG:    subfunction 05h does not appear to work correctly in DESQview 2.52
  1329. SeeAlso: INT 10/AH=FEh,INT 10/AH=FFh,INT 15/AX=1024h,INT 15/AX=DE30h
  1330. ----------212B--CX454C-----------------------
  1331. INT 21 - ELRES v1.1 - INSTALLATION CHECK
  1332.     AH = 2Bh
  1333.     CX = 454Ch ('EL')
  1334.     DX = 5253h ('RS')
  1335. Return: ES:BX -> ELRES history structure (see below)
  1336.     DX = DABEh (signature, DAve BEnnett)
  1337. Note:    ELRES is an MSDOS return code (errorlevel) recorder by David H. Bennett
  1338.       which stores recent errorlevel values, allows them to be retrieved
  1339.       for use in batch files, and can place them in an environment variable
  1340. SeeAlso: AH=4Bh"ELRES",AH=4Dh
  1341.  
  1342. Format of ELRES history structure:
  1343. Offset    Size    Description
  1344.  00h    WORD    number of return codes which can be stored by following buffer
  1345.  02h    WORD    current position in buffer (treated as a ring)
  1346.  04h  N BYTEs    ELRES buffer
  1347. ----------212B01CX5441-----------------------
  1348. INT 21 - TAME v2.10+ - INSTALLATION CHECK
  1349.     AX = 2B01h
  1350.     CX = 5441h ('TA')
  1351.     DX = 4D45h ('ME')
  1352. ---v2.60---
  1353.     BH = ???
  1354.         00h skip ???, else do
  1355. Return: AL = 02h if installed
  1356.     ES:DX -> data area in TAME-RES (see below)
  1357. Note:    TAME is a shareware program by David G. Thomas which gives up CPU time
  1358.       to other partitions under a multitasker when the current partition's
  1359.       program incessantly polls the keyboard or system time
  1360.  
  1361. Format of TAME 2.10-2.20 data area:
  1362. Offset    Size    Description
  1363.  00h    BYTE    data structure minor version number (01h in TAME 2.20)
  1364.  01h    BYTE    data structure major version number (07h in TAME 2.20)
  1365.  02h    DWORD    number of task switches
  1366.  06h    DWORD    number of keyboard polls
  1367.  0Ah    DWORD    number of time polls
  1368.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1369.  12h    DWORD    original INT 10h
  1370.  16h    DWORD    original INT 14h
  1371.  1Ah    DWORD    original INT 15h
  1372.  1Eh    DWORD    original INT 16h
  1373.  22h    DWORD    original INT 17h
  1374.  26h    DWORD    original INT 21h
  1375.  2Ah    DWORD    original INT 28h
  1376.  2Eh    WORD    offset of TAME INT 10h handler
  1377.  30h    WORD    offset of TAME INT 14h handler
  1378.  32h    WORD    offset of TAME INT 15h handler
  1379.  34h    WORD    offset of TAME INT 16h handler
  1380.  36h    WORD    offset of TAME INT 17h handler
  1381.  38h    WORD    offset of TAME INT 21h handler
  1382.  3Ah    WORD    offset of TAME INT 28h handler
  1383.  3Ch    WORD    X in /max:X,Y or /freq:X,Y
  1384.  3Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1385.  40h    WORD    number of polls remaining before next task switch
  1386.  42h    WORD    /KEYIDLE value
  1387.  44h    BYTE    flags for interrupts already grabbed by TAME
  1388.         bit 0: INT 10h
  1389.             1: INT 14h
  1390.             2: INT 15h
  1391.             3: INT 16h
  1392.             4: INT 17h
  1393.             5: INT 21h
  1394.             6: INT 28h
  1395.  45h    BYTE    flags for interrupts which may be acted on (same bits as above)
  1396.  46h    BYTE    TAME enabled (01h) or disabled (00h)
  1397.  47h    BYTE    /TIMEPOLL (01h) or /NOTIMEPOLL (00h)
  1398.  48h    BYTE    /NOTIMER (01h) or /TIMER (00h)
  1399.  49h    BYTE    window or task number for this task
  1400.  4Ah    BYTE    multitasker type ???
  1401.         01h DESQview
  1402.         02h DoubleDOS
  1403.         03h TopView
  1404.         ???
  1405.  4Bh    BYTE    type of task switching selected
  1406.         bit 0: DESQview???
  1407.             1: DoubleDOS???
  1408.             2: TopView???
  1409.             3: KeySwitch
  1410.             4: HLT instruction
  1411.  4Ch    BYTE    ???
  1412.  4Dh    BYTE    flags
  1413.         bit 1: /FREQ instead of /MAX
  1414.  4Eh    BYTE    /FG: value
  1415.  4Fh    BYTE    task switches left until next FGONLY DESQview API call
  1416.  50h    BYTE    ???
  1417.  
  1418. Format of TAME 2.30 data area:
  1419. Offset    Size    Description
  1420.  00h    BYTE    data structure minor version number (02h in TAME 2.30)
  1421.  01h    BYTE    data structure major version number (0Ah in TAME 2.30)
  1422.  02h    DWORD    number of task switches
  1423.  06h    DWORD    number of keyboard polls
  1424.  0Ah    DWORD    number of time polls
  1425.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1426.  12h    DWORD    time of last /CLEAR or TAME-RES load
  1427.  16h    DWORD    time yielded
  1428.  1Ah    DWORD    time spent polling
  1429.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  1430.  22h    DWORD    original INT 10h
  1431.  26h    DWORD    original INT 14h
  1432.  2Ah    DWORD    original INT 15h
  1433.  2Eh    DWORD    original INT 16h
  1434.  32h    DWORD    original INT 17h
  1435.  36h    DWORD    original INT 21h
  1436.  3Ah    DWORD    original INT 28h
  1437.  3Eh    WORD    offset of TAME INT 10h handler
  1438.  40h    WORD    offset of TAME INT 14h handler
  1439.  42h    WORD    offset of TAME INT 15h handler
  1440.  44h    WORD    offset of TAME INT 16h handler
  1441.  46h    WORD    offset of TAME INT 17h handler
  1442.  48h    WORD    offset of TAME INT 21h handler
  1443.  4Ah    WORD    offset of TAME INT 28h handler
  1444.  4Ch    WORD    X in /max:X,Y or /freq:X,Y
  1445.  4Eh    WORD    Y in /max:X,Y or /freq:X,Y
  1446.  50h    WORD    number of polls remaining before next task switch
  1447.  52h    WORD    /KEYIDLE value
  1448.  54h    WORD    /FG: value
  1449.  56h    WORD    task switches left until next FGONLY DESQview API call
  1450.  58h    WORD    multitasker version
  1451.  5Ah    WORD    virtual screen segment
  1452.  5Ch    BYTE    flags for interrupts already grabbed by TAME
  1453.         bit 0: INT 10h
  1454.             1: INT 14h
  1455.             2: INT 15h
  1456.             3: INT 16h
  1457.             4: INT 17h
  1458.             5: INT 21h
  1459.             6: INT 28h
  1460.  5Dh    BYTE    flags for interrupts which may be acted on (same bits as above)
  1461.  5Eh    BYTE    window or task number for this task
  1462.  5Fh    BYTE    multitasker type
  1463.         01h DESQview
  1464.         02h DoubleDOS
  1465.         03h TopView
  1466.         04h OmniView
  1467.         05h VM/386
  1468.  60h    BYTE    type of task switching selected (bit flags)
  1469.         bit 0: DESQview
  1470.             1: DoubleDOS
  1471.             2: TopView
  1472.             3: OmniView
  1473.             4: KeySwitch
  1474.             5: HLT instruction
  1475.  61h    BYTE    watch_DOS
  1476.  62h    BYTE    bit flags
  1477.         bit 0: TAME enabled
  1478.             1: /FREQ instead of /MAX (counts in 3Ch and 3Eh per tick)
  1479.             2: /TIMEPOLL
  1480.             3: /KEYPOLL
  1481.             4: inhibit timer
  1482.             5: enable status monitoring
  1483.  63h    BYTE    old status
  1484.  64h    WORD    signature DA34h
  1485.  
  1486. Format of TAME 2.60 data area:
  1487. Offset    Size    Description
  1488.  00h    BYTE    data structure minor version number (02h in TAME 2.60)
  1489.  01h    BYTE    data structure major version number (0Bh in TAME 2.60)
  1490.  02h    DWORD    number of task switches
  1491.  06h    DWORD    number of keyboard polls
  1492.  0Ah    DWORD    number of time polls
  1493.  0Eh    DWORD    number of times DESQview told program runs only in foreground
  1494.  12h    DWORD    time of last /CLEAR or TAME-RES load
  1495.  16h    DWORD    time yielded
  1496.  1Ah    DWORD    time spent polling
  1497.  1Eh    DWORD    time spent waiting on key input with INT 16/AH=01h,11h
  1498.  22h  4 BYTEs    ???
  1499.  26h    DWORD    original INT 10h
  1500.  2Ah    DWORD    original INT 14h
  1501.  2Eh    DWORD    original INT 15h
  1502.  32h    DWORD    original INT 16h
  1503.  36h    DWORD    original INT 17h
  1504.  3Ah    DWORD    original INT 21h
  1505.  3Eh    DWORD    original INT 28h
  1506.  42h    WORD    offset of TAME INT 10h handler
  1507.  44h    WORD    offset of TAME INT 14h handler
  1508.  46h    WORD    offset of TAME INT 15h handler
  1509.  48h    WORD    offset of TAME INT 16h handler
  1510.  4Ah    WORD    offset of TAME INT 17h handler
  1511.  4Ch    WORD    offset of TAME INT 21h handler
  1512.  4Eh    WORD    offset of TAME INT 28h handler
  1513.  50h    WORD    X in /max:X,Y or /freq:X,Y
  1514.  52h    WORD    Y in /max:X,Y or /freq:X,Y
  1515.  54h    WORD    number of polls remaining before next task switch
  1516.  56h    WORD    /KEYIDLE value
  1517.  58h  4 BYTEs    ???
  1518.  5Ch    WORD    X in /boost:X,Y
  1519.  5Eh    WORD    Y in /boost:X,Y
  1520.  60h    WORD    /FG: value
  1521.  62h    WORD    task switches left until next FGONLY DESQview API call
  1522.  64h    WORD    multitasker version ???
  1523.  66h    WORD    virtual screen segment
  1524.  68h    BYTE    flags for interrupts already grabbed by TAME
  1525.         bit 0: INT 10h
  1526.             1: INT 14h
  1527.             2: INT 15h
  1528.             3: INT 16h
  1529.             4: INT 17h
  1530.             5: INT 21h
  1531.             6: INT 28h
  1532.  69h    BYTE    flags for interrupts which may be acted on (same bits as above)
  1533.  6Ah    BYTE    window or task number for this task
  1534.  6Bh    BYTE    multitasker type
  1535.         01h DESQview
  1536.         02h DoubleDOS
  1537.         03h TopView
  1538.         04h OmniView
  1539.         05h VM/386
  1540.  6Ch    BYTE    type of task switching selected (bit flags)
  1541.         bit 0: DESQview
  1542.             1: DoubleDOS
  1543.             2: TopView
  1544.             3: OmniView
  1545.             4: KeySwitch
  1546.             5: HLT instruction
  1547.  6Dh    BYTE    watch_DOS
  1548.  6Eh    BYTE    bit flags
  1549.         bit 0: TAME enabled
  1550.             1: /FREQ instead of /MAX (counts in 50h and 52h per tick)
  1551.             2: /TIMEPOLL
  1552.             3: /KEYPOLL
  1553.             4: inhibit timer
  1554.             5: enable status monitoring
  1555.  6Fh    BYTE    old status
  1556.  70h    WORD    signature DA34h
  1557. ----------212B44BX4D41-----------------------
  1558. INT 21 - pcANYWHERE IV/LAN - INSTALLATION CHECK
  1559.     AX = 2B44h ('D')
  1560.     BX = 4D41h ('MA')
  1561.     CX = 7063h ('pc')
  1562.     DX = 4157h ('AW')
  1563. Return: AX = 4F4Bh ('OK') if large host resident
  1564.        = 6F6Bh ('ok') if small host resident
  1565.     CX:DX -> API entry point
  1566. SeeAlso: INT 16/AH=79h
  1567.  
  1568. Call API entry point with:
  1569.     AX = 0000h get pcANYWHERE IV version
  1570.         DS:SI -> BYTE buffer for host type code
  1571.         Return: AH = version number
  1572.             AL = revision number
  1573.             DS:DI buffer byte filled with
  1574.             00h full-featured host
  1575.             01h limited-feature LAN host
  1576.             other API may not be supported
  1577.     AX = 0001h initialize operation
  1578.         DS:SI -> initialization request structure (see below)
  1579.         Return: AX = function status (see below)
  1580.     AX = 0002h get status
  1581.         Return: AH = current operating mode (see init req structure below)
  1582.             AL = current connection status
  1583.             bit 0: a physical connection is active
  1584.             bit 1: remove screen updating is active
  1585.             bit 2: connection checking is active
  1586.             bit 3: hot key detection is active
  1587.             bit 4: background file transfer is active
  1588.     AX = 0003h suspend remote screen updates
  1589.         Return: AX = function status (see below)
  1590.     AX = 0004h resume screen updates
  1591.         Return: AX = function status (see below)
  1592.     AX = 0005h end current remote access session
  1593.         DS:SI -> termination request structure (see below)
  1594.         Return: AX = function status (see below)
  1595.     AX = 0006h remove pcANYWHERE IV from memory
  1596.         Return: AX = status
  1597.             0000h successful
  1598.             FFD2h unable to release allocated memory
  1599.             FFD1h unable to release interrupt vectors
  1600.     AX = 8000h read data from communications channel
  1601.         DS:BX -> buffer
  1602.         CX = buffer size
  1603.         Return: AX >= number of characters read/available
  1604.             AX < 0 on error
  1605.     AX = 8001h write data to communications channel
  1606.         DS:BX -> buffer
  1607.         CX = buffer size
  1608.         Return: AX >= number of characters written
  1609.             AX < 0 on error
  1610.     AX = 8002h get connection status
  1611.         Return: AX = status
  1612.             > 0000h if connection active
  1613.             = 0000h if connection lost
  1614.             < 0000h on error
  1615.  
  1616. Format of initialization request structure:
  1617. Offset    Size    Description
  1618.  00h    BYTE    operating mode
  1619.         00h wait for a call
  1620.         01h hot key activates
  1621.         02h incoming call activates
  1622.         03h initiate a call
  1623.  01h  3 BYTEs    user ID to append to config file names
  1624.  04h    WORD    DS-relative pointer to path for config files
  1625.  06h    WORD    DS-relative pointer to path for program files
  1626.  
  1627. Format of termination request structure:
  1628. Offset    Size    Description
  1629.  00h    BYTE    operating mode after termination
  1630.         00h wait for a call
  1631.         01h hot key activates
  1632.         02h incoming call activates
  1633.         80h use current mode
  1634.         FFh remove from memory
  1635.  
  1636. Values for function status:
  1637.  0000h function completed successfully
  1638.  FFF2h unable to establish a connection when operating mode is
  1639.     "Initiate a call"
  1640.  FFF3h modem configuration is invalid (corrupt config)
  1641.  FFF4h modem initialization failed (no modem response)
  1642.  FFF5h the communications device could not be initialized
  1643.  FFF6h the host operator aborted the function
  1644.  FFF7h the communications driver type specified in the configuration file is
  1645.     different than the one loaded when pcANYWHERE IV was initially started
  1646.  FFF9h the configuration file is invalid
  1647.  FFFAh the configuration file could not be found
  1648.  FFFBh no session is active
  1649.  FFFCh a remote access session is active
  1650.  FFFDh the specified operating mode is invalid
  1651. ----------212C-------------------------------
  1652. INT 21 - DOS 1+ - GET SYSTEM TIME
  1653.     AH = 2Ch
  1654. Return: CH = hour
  1655.     CL = minute
  1656.     DH = second
  1657.     DL = 1/100 seconds
  1658. Note:    on most systems, the resolution of the system clock is about 5/100sec,
  1659.       so returned times generally do not increment by 1
  1660.     on some systems, DL may always return 00h
  1661. SeeAlso: AH=2Ah,AH=2Dh,AH=E7h,INT 1A/AH=00h,INT 1A/AH=02h,INT 1A/AH=FEh
  1662. SeeAlso: INT 2F/AX=120Dh
  1663. ----------212D-------------------------------
  1664. INT 21 - DOS 1+ - SET SYSTEM TIME
  1665.     AH = 2Dh
  1666.     CH = hour
  1667.     CL = minute
  1668.     DH = second
  1669.     DL = 1/100 seconds
  1670. Return: AL = result
  1671.         00h successful
  1672.         FFh invalid time, system time unchanged
  1673. Note:    DOS 3.3+ also sets CMOS clock
  1674. SeeAlso: AH=2Bh"DOS",AH=2Ch,INT 1A/AH=01h,INT 1A/AH=03h,INT 1A/AH=FFh"AT&T"
  1675. ----------212E--DL00-------------------------
  1676. INT 21 - DOS 1+ - SET VERIFY FLAG
  1677.     AH = 2Eh
  1678.     DL = 00h (DOS 1.x/2.x only)
  1679.     AL = new state of verify flag
  1680.         00h off
  1681.         01h on
  1682. Notes:    default state at system boot is OFF
  1683.     when ON, all disk writes are verified provided the device driver
  1684.       supports read-after-write verification
  1685. SeeAlso: AH=54h
  1686. ----------212F-------------------------------
  1687. INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
  1688.     AH = 2Fh
  1689. Return: ES:BX -> current DTA
  1690. Note:    under the FlashTek X-32 DOS extender, the pointer is in ES:EBX
  1691. SeeAlso: AH=1Ah
  1692. ----------2130-------------------------------
  1693. INT 21 - DOS 2+ - GET DOS VERSION
  1694.     AH = 30h
  1695. ---DOS 5.0---
  1696.     AL = what to return in BH
  1697.         00h OEM number (as for DOS 2.0-4.0x)
  1698.         01h version flag
  1699. Return: AL = major version number (00h if DOS 1.x)
  1700.     AH = minor version number
  1701.     BL:CX = 24-bit user serial number (most versions do not use this)
  1702. ---if DOS <5 or AL=00h---
  1703.     BH = OEM number
  1704.         00h IBM
  1705.         05h Zenith
  1706.         16h DEC
  1707.         23h Olivetti
  1708.         29h Toshiba
  1709.         4Dh    Hewlett-Packard
  1710.         99h    STARLITE architecture (OEM DOS, NETWORK DOS, SMP DOS)
  1711.         FFh Microsoft, Phoenix
  1712. ---if DOS 5.0 and AL=01h---
  1713.     BH = version flag
  1714.         08h DOS is in ROM
  1715.         10h DOS is in HMA
  1716. Notes:    the OS/2 v1.x Compatibility Box returns major version 0Ah (10)
  1717.     the OS/2 v2.x Compatibility Box returns major version 14h (20)
  1718.     the Windows/NT DOS box returns major version 1Eh (30)
  1719.     DOS 4.01 and 4.02 identify themselves as version 4.00; use
  1720.       INT 21/AH=87h to distinguish between the original European MSDOS 4.00
  1721.       and the later PCDOS 4.0x and MSDOS 4.0x
  1722.     generic MSDOS 3.30, Compaq MSDOS 3.31, and others identify themselves
  1723.       as PC-DOS by returning OEM number 00h
  1724.     the version returned under DOS 4.0x may be modified by entries in
  1725.       the special program list (see AH=52h)
  1726.     the version returned under DOS 5.0 may be modified by SETVER; use
  1727.       AX=3306h to get the true version number
  1728. SeeAlso: AX=3000h/BX=3000h,AX=3306h,AX=4452h,AH=87h,INT 15/AX=4900h
  1729. SeeAlso: INT 2F/AX=122Fh,INT 2F/AX=E002h
  1730. ----------2130-------------------------------
  1731. INT 21 - Phar Lap 386/DOS-Extender, Intel Code Builder - INSTALLATION CHECK
  1732.     AH = 30h
  1733.     EAX = 00003000h
  1734.     EBX = 50484152h ("PHAR")
  1735. Return: AL = major DOS version
  1736.     AH = minor DOS version
  1737.     EAX bits 31-16 = 4458h ('DX') if 386/DOS-extender installed
  1738.         BL = ASCII major version number
  1739.     EAX bits 31-16 = 4243h ('BC') if Intel Code Builder installed
  1740.         EDX = address of GDA
  1741. SeeAlso: AX=2501h,AX=FF00h,INT 2F/AX=F100h
  1742. ----------2130--DXABCD-----------------------
  1743. INT 21 - VIRUS - "Possessed" - INSTALLATION CHECK
  1744.     AH = 30h
  1745.     DX = ABCDh
  1746. Return: DX = DCBAh if installed
  1747. SeeAlso: AX=0D20h,AX=30F1h
  1748. ----------213000BX1234-----------------------
  1749. INT 21 - CTask 2.0+ - INSTALLATION CHECK
  1750.     AX = 3000h
  1751.     BX = 1234h
  1752.     DS:DX -> 8-byte version string (DX < FFF0h) "CTask21",00h for v2.1-2.2
  1753. Return: AL = DOS major version
  1754.     AH = DOS minor version
  1755.     CX:BX -> Ctask global data block
  1756. Notes:    if first eight bytes of returned data block equal eight bytes passed
  1757.       in, CTask is resident
  1758.     CTask is a multitasking kernel for C written by Thomas Wagner
  1759. ----------213000BX3000-----------------------
  1760. INT 21 - PC-MOS/386 v3.0 - INSTALLATION CHECK/GET VERSION
  1761.     AX = 3000h
  1762.     BX = 3000h
  1763.     CX = DX = 3000h
  1764. Return: AX = PC-MOS version
  1765. Program: PC-MOS/386 is a multitasking/multiuser MSDOS-compatible operating
  1766.       system by Software Links, Inc.
  1767. SeeAlso: AH=30h,INT 38/AH=02h,INT 38/AH=10h
  1768. ----------2130F1-----------------------------
  1769. INT 21 - VIRUS - "Dutch-555"/"Quit 1992" - INSTALLATION CHECK
  1770.     AX = 30F1h
  1771. Return: AL = 00h if resident
  1772. SeeAlso: AH=30h/DX=ABCDh,AX=330Fh
  1773. ----------2130FFCX4445-----------------------
  1774. INT 21 - DESQ??? - INSTALLATION CHECK
  1775.     AX = 30FFh
  1776.     CX = 4445h ("DE")
  1777.     DX = 5351h ("SQ")
  1778. Return: BH = 05h if installed
  1779.     ???
  1780. Note:    called by DUBLDISK.COM v2.6; this function is not supported by
  1781.       DESQview, so it may be for DESQview's precursor DESQ.
  1782. SeeAlso: AX=4404h"DUBLDISK"
  1783. ----------2131-------------------------------
  1784. INT 21 - DOS 2+ - TERMINATE AND STAY RESIDENT
  1785.     AH = 31h
  1786.     AL = return code
  1787.     DX = number of paragraphs to keep resident
  1788. Return: never
  1789. Notes:    the value in DX only affects the memory block containing the PSP;
  1790.       additional memory allocated via AH=48h is not affected
  1791.     the minimum number of paragraphs which will remain resident is 11h
  1792.       for DOS 2.x and 06h for DOS 3+
  1793.     most TSRs can save some memory by releasing their environment block
  1794.       before terminating (see AH=26h,AH=49h)
  1795. SeeAlso: AH=00h,AH=4Ch,AH=4Dh,INT 20,INT 22,INT 27
  1796. ----------2132-------------------------------
  1797. INT 21 - DOS 2+ - GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE
  1798.     AH = 32h
  1799.     DL = drive number (00h = default, 01h = A:, etc)
  1800. Return: AL = status
  1801.         00h successful
  1802.         DS:BX -> Drive Parameter Block (DPB) for specified drive
  1803.         FFh invalid or network drive
  1804. Notes:    the OS/2 compatibility box supports the DOS 3.3 version of this call
  1805.       except for the DWORD at offset 12h
  1806.     this call updates the DPB by reading the disk; the DPB may be accessed
  1807.       via the DOS list of lists (see AH=52h) if disk access is not
  1808.       desirable.
  1809.     undocumented prior to the release of DOS 5.0; only the DOS 4+ version
  1810.       of the DPB has been documented, however
  1811. SeeAlso: AH=1Fh,AH=52h
  1812.  
  1813. Format of DOS Drive Parameter Block:
  1814. Offset    Size    Description
  1815.  00h    BYTE    drive number (00h = A:, 01h = B:, etc)
  1816.  01h    BYTE    unit number within device driver
  1817.  02h    WORD    bytes per sector
  1818.  04h    BYTE    highest sector number within a cluster
  1819.  05h    BYTE    shift count to convert clusters into sectors
  1820.  06h    WORD    number of reserved sectors at beginning of drive
  1821.  08h    BYTE    number of FATs
  1822.  09h    WORD    number of root directory entries
  1823.  0Bh    WORD    number of first sector containing user data
  1824.  0Dh    WORD    highest cluster number (number of data clusters + 1)
  1825.         16-bit FAT if greater than 0FF6h, else 12-bit FAT
  1826.  0Fh    BYTE    number of sectors per FAT
  1827.  10h    WORD    sector number of first directory sector
  1828.  12h    DWORD    address of device driver header
  1829.  16h    BYTE    media ID byte
  1830.  17h    BYTE    00h if disk accessed, FFh if not
  1831.  18h    DWORD    pointer to next DPB
  1832. ---DOS 2.x---
  1833.  1Ch    WORD    cluster containing start of current directory, 0000h=root,
  1834.         FFFFh = unknown
  1835.  1Eh 64 BYTEs    ASCIZ pathname of current directory for drive
  1836. ---DOS 3.x---
  1837.  1Ch    WORD    cluster at which to start search for free space when writing
  1838.  1Eh    WORD    number of free clusters on drive, FFFFh = unknown
  1839. ---DOS 4.0-5.0---
  1840.  0Fh    WORD    number of sectors per FAT
  1841.  11h    WORD    sector number of first directory sector
  1842.  13h    DWORD    address of device driver header
  1843.  17h    BYTE    media ID byte
  1844.  18h    BYTE    00h if disk accessed, FFh if not
  1845.  19h    DWORD    pointer to next DPB
  1846.  1Dh    WORD    cluster at which to start search for free space when writing,
  1847.         usually the last cluster allocated
  1848.  1Fh    WORD    number of free clusters on drive, FFFFh = unknown
  1849. ----------2133-------------------------------
  1850. INT 21 - DOS 2+ - EXTENDED BREAK CHECKING
  1851.     AH = 33h
  1852.     AL = subfunction
  1853.         00h get current extended break state
  1854.         Return: DL = current state, 00h = off, 01h = on
  1855.         01h set state of extended ^C/^Break checking
  1856.         DL = 00h off, check only on character I/O functions
  1857.              01h on, check on all DOS functions
  1858. Note:    under DOS 3.1+, this function does not use any of the DOS-internal and
  1859.       may thus be called at any time
  1860. SeeAlso: AX=3302h
  1861. ----------213302-----------------------------
  1862. INT 21 - DOS 3.x+ internal - GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE
  1863.     AX = 3302h
  1864.     DL = new state
  1865.          00h for OFF or 01h for ON
  1866. Return: DL = old state of extended BREAK checking
  1867. Note:    this function does not use any of the DOS-internal stacks and may thus
  1868.       be called at any time; one possible use is modifying Control-Break
  1869.       checking from within an interrupt handler or TSR
  1870. SeeAlso: AH=33h
  1871. ----------213305-----------------------------
  1872. INT 21 - DOS 4+ - GET BOOT DRIVE
  1873.     AX = 3305h
  1874. Return: DL = boot drive (1=A:,...)
  1875. Notes:    fully reentrant
  1876.     NEC 9800-series PCs always call the boot drive A: and assign the other
  1877.       drive letters sequentially to the other drives in the system
  1878. ----------213306-----------------------------
  1879. INT 21 - DOS 5.0 - GET TRUE VERSION NUMBER
  1880.     AX = 3306h
  1881. Return:    BL = major version
  1882.     BH = minor version
  1883.     DL = revision (bits 2-0, all others 0)
  1884.     DH = version flags
  1885.         bit 3: DOS is in ROM
  1886.         bit 4: DOS in in HMA
  1887. Notes:    this function always returns the true version number, unlike AH=30h,
  1888.       whose return value may be changed with SETVER
  1889.     because of the conflict from the CBIS PowerLAN redirector (see next
  1890.       entry), programs should check whether BH is less than 100 (64h)
  1891.       and BL is at least 5 before accepting the returned BX as the true
  1892.       version number; however, even this is not entirely reliable when
  1893.       that redirector is loaded
  1894.     fully reentrant
  1895. BUG:    DR-DOS 5.0 and 6.0 return CF set/AX=0001h for INT 21/AH=33h
  1896.       subfunctions other than 00h-02h and 05h, while MS-DOS returns AL=FFh
  1897.       for invalid subfunctions
  1898. SeeAlso: AH=30h,INT 2F/AX=112Fh
  1899. ----------213306-----------------------------
  1900. INT 21 - CBIS POWERLAN - NETWORK REDIRECTOR - ???
  1901.     AX = 3306h
  1902. Return: AX = 3306h
  1903.     BL = ??? (usually 00h)
  1904.     BH = ??? (usually 00h or FFh)
  1905. Note:    unknown function, is in conflict with DOS 5.0 version call
  1906. SeeAlso: AX=3306h"DOS"
  1907. ----------21330F-----------------------------
  1908. INT 21 - VIRUS - "Burghofer" - INSTALLATION CHECK
  1909.     AX = 330Fh
  1910. Return: AL = 0Fh if resident (DOS returns AL=FFh)
  1911. SeeAlso: AX=30F1h,AX=33E0h
  1912. ----------2133E0-----------------------------
  1913. INT 21 - VIRUS - "Oropax" - INSTALLATION CHECK
  1914.     AX = 33E0h
  1915. Return: AL = E0h if resident (DOS returns AL=FFh)
  1916. SeeAlso: AX=330Fh,AX=357Fh
  1917. ----------2134-------------------------------
  1918. INT 21 - DOS 2+ - GET ADDRESS OF INDOS FLAG
  1919.     AH = 34h
  1920. Return: ES:BX -> one-byte InDOS flag
  1921. Notes:    the value of InDOS is incremented whenever an INT 21 function begins
  1922.       and decremented whenever one completes
  1923.     during an INT 28 call, it is safe to call some INT 21 functions even
  1924.       though InDOS may be 01h instead of zero
  1925.     InDOS alone is not sufficient for determining when it is safe to
  1926.       enter DOS, as the critical error handling decrements InDOS and
  1927.       increments the critical error flag for the duration of the critical
  1928.       error.  Thus, it is possible for InDOS to be zero even if DOS is
  1929.       busy.
  1930.     the critical error flag is the byte immediately following InDOS in
  1931.       DOS 2.x, and the byte BEFORE the InDOS flag in DOS 3+ (except COMPAQ
  1932.       DOS 3.0, where the critical error flag is located 1AAh bytes BEFORE
  1933.       the critical section flag)
  1934.     For DOS 3.1+, an undocumented call exists to get the address of the
  1935.       critical error flag (see AX=5D06h)
  1936.     this function was undocumented prior to the release of DOS 5.0.
  1937. SeeAlso: AX=5D06h,AX=5D0Bh,INT 15/AX=DE1Fh,INT 28
  1938. ----------2135-------------------------------
  1939. INT 21 - DOS 2+ - GET INTERRUPT VECTOR
  1940.     AH = 35h
  1941.     AL = interrupt number
  1942. Return: ES:BX -> current interrupt handler
  1943. SeeAlso: AH=25h,AX=2503h
  1944. ----------213501-----------------------------
  1945. INT 21 P - FlashTek X-32VM - ALLOCATE PROTECTED-MODE SELECTOR
  1946.     AX = 3501h
  1947. Return: CF clear if successful
  1948.         BX = new selector
  1949.     CF set on error (no more selectors available)
  1950. Note:    the new selector will be an expand-up read/write data selector with
  1951.       undefined base and limit
  1952. SeeAlso: AX=3502h,INT 31/AX=0000h
  1953. ----------213502-----------------------------
  1954. INT 21 P - FlashTek X-32VM - DEALLOCATE PROTECTED-MODE SELECTOR
  1955.     AX = 3502h
  1956.     BX = selector
  1957. Return: CF clear if successful
  1958.     CF set on error (invalid selector)
  1959. Note:    only selectors allocated via AX=3501h should be deallocated
  1960. SeeAlso: AX=3501h,INT 31/AX=0001h
  1961. ----------213503-----------------------------
  1962. INT 21 P - FlashTek X-32VM - SET SELECTOR BASE ADDRESS
  1963.     AX = 3503h
  1964.     BX = selector
  1965.     ECX = base address
  1966. Return: CF clear if successful
  1967.     CF set on error (invalid selector)
  1968. SeeAlso: AX=3504h,AX=3505h,INT 31/AX=0007h
  1969. ----------213504-----------------------------
  1970. INT 21 P - FlashTek X-32VM - GET SELECTOR BASE ADDRESS
  1971.     AX = 3504h
  1972.     BX = selector
  1973. Return: CF clear if successful
  1974.         ECX = absolute base address of selector
  1975.     CF set on error (invalid selector)
  1976. SeeAlso: AX=3503h,INT 31/AX=0006h
  1977. ----------213505-----------------------------
  1978. INT 21 P - FlashTek X-32VM - SET SELECTOR LIMIT
  1979.     AX = 3505h
  1980.     BX = selector
  1981.     ECX = desired limit
  1982. Return: CF clear if successful
  1983.         ECX = actual limit set
  1984.     CF set on error (no more selectors available)
  1985. Note:    the limit will be rounded down to nearest 4K boundary if the requested
  1986.       limit is greater than 1MB
  1987. SeeAlso: AX=3503h,INT 31/AX=0008h
  1988. ----------21350A-----------------------------
  1989. INT 21 P - FlashTek X-32VM - PHYSICAL ADDRESS MAPPING
  1990.     AX = 350Ah
  1991.     EBX = absolute physical address
  1992.     ECX = size in bytes of area to map
  1993. Return: CF clear if successful
  1994.     CF set on error (insufficient memory or service refused by DPMI host)
  1995. Notes:    should not make repeated calls for the same physical address
  1996.     there is no provision for unmapping memory
  1997. ----------21350B-----------------------------
  1998. INT 21 P - FlashTek X-32VM - UPDATE AND RETURN AVAILABLE FREE MEMORY
  1999.     AX = 350Bh
  2000.     DS = default selector for DS
  2001. Return: CF clear
  2002.     EAX = maximum amount of memory which can be allocated via AX=350Ch
  2003. SeeAlso: AX=350Ch
  2004. ----------21350C-----------------------------
  2005. INT 21 P - FlashTek X-32VM - ALLOCATE A BLOCK OF MEMORY
  2006.     AX = 350Ch
  2007.     ECX = size of block in bytes
  2008.     DS = default DS
  2009. Return: CF clear if successful
  2010.         EAX = near pointer to new block
  2011.         EDX = new lowest legal value for stack
  2012.     CF set on error (requested size not multiple of 4K)
  2013. SeeAlso: AX=350Bh,AX=350Dh
  2014. ----------21350D-----------------------------
  2015. INT 21 P - FlashTek X-32VM - RESERVE BLOCK OF MEMORY FOR 32-BIT STACK
  2016.     AX = 350Dh
  2017.     EBX = current ESP value
  2018.     ECX = size of block in bytes
  2019.     DS = default DS
  2020. Return: CF clear if successful
  2021.         EBX = new value for ESP
  2022.         EDX = suggested new limit for SS
  2023.     CF set on error
  2024. Note:    this function should only be called once during initialization
  2025. SeeAlso: AX=350Bh,AX=350Ch
  2026. ----------21357F-----------------------------
  2027. INT 21 - VIRUS - "Agiplan"/"Month 4-6" - INSTALLATION CHECK
  2028.     AX = 357Fh
  2029. Return: DX = FFFFh if installed
  2030. SeeAlso: AX=33E0h,AX=3DFFh
  2031. ----------2136-------------------------------
  2032. INT 21 - DOS 2+ - GET FREE DISK SPACE
  2033.     AH = 36h
  2034.     DL = drive number (00h = default, 01h = A:, etc)
  2035. Return: AX = FFFFh if invalid drive
  2036.     else
  2037.         AX = sectors per cluster
  2038.         BX = number of free clusters
  2039.         CX = bytes per sector
  2040.         DX = total clusters on drive
  2041. Notes:    free space on drive in bytes is AX * BX * CX
  2042.     total space on drive in bytes is AX * CX * DX
  2043.     "lost clusters" are considered to be in use
  2044.     according to Dave Williams' MSDOS reference, the value in DX is
  2045.       incorrect for non-default drives after ASSIGN is run
  2046. SeeAlso: AH=1Bh,AH=1Ch
  2047. ----------213700-----------------------------
  2048. INT 21 - DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
  2049.     AX = 3700h
  2050. Return: AL = status
  2051.         00h successful
  2052.         DL = current switch character
  2053.         FFh unsupported subfunction
  2054. Desc:    Determine the character which is used to introduce command switches.
  2055.       This setting is ignored by DOS commands in version 4.0 and higher,
  2056.       but is honored by many third-party programs.
  2057. Notes:    documented in some OEM versions of some releases of DOS
  2058.     supported by OS/2 compatibility box
  2059.     always returns DL=2Fh for DOS 5.0
  2060. SeeAlso: AX=3701h
  2061. ----------213701-----------------------------
  2062. INT 21 - DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
  2063.     AX = 3701h
  2064.     DL = new switch character
  2065. Return: AL = status
  2066.         00h successful
  2067.         FFh unsupported subfunction
  2068. Notes:    documented in some OEM versions of some releases of DOS
  2069.     supported by OS/2 compatibility box
  2070.     ignored by DOS 5.0
  2071. SeeAlso: AX=3700h
  2072. ----------2137-------------------------------
  2073. INT 21 - DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
  2074.     AH = 37h
  2075.     AL = subfunction
  2076.         02h get availdev flag
  2077.         Return: DL = 00h \DEV\ must precede character device names
  2078.                = nonzero \DEV\ is optional
  2079.         03h set availdev flag
  2080.         DL = 00h    \DEV\ is mandatory
  2081.            = nonzero    \DEV\ is optional
  2082. Return: AL = status
  2083.         00h successful
  2084.         FFh unsupported subfunction
  2085. Notes:    all versions of DOS from 2.00 allow \DEV\ to be prepended to device
  2086.       names without generating an error even if the directory \DEV does
  2087.       not actually exist (other paths generate an error if they do not
  2088.       exist).
  2089.     although DOS 3.3+ accepts these calls, they have no effect, and
  2090.       AL=02h always returns DL=FFh
  2091. ----------2138-------------------------------
  2092. INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
  2093.     AH = 38h
  2094. --DOS 2.x--
  2095.     AL = 00h get current-country info
  2096.     DS:DX -> buffer for returned info (see below)
  2097. Return: CF set on error
  2098.         AX = error code (02h)
  2099.     CF clear if successful
  2100.         AX = country code (MSDOS 2.11 only)
  2101.         buffer at DS:DX filled
  2102. --DOS 3+--
  2103.     AL = 00h for current country
  2104.     AL = 01h thru 0FEh for specific country with code <255
  2105.     AL = 0FFh for specific country with code >= 255
  2106.        BX = 16-bit country code
  2107.     DS:DX -> buffer for returned info (see below)
  2108. Return:    CF set on error
  2109.         AX = error code (02h)
  2110.     CF clear if successful
  2111.         BX = country code
  2112.         DS:DX buffer filled
  2113. SeeAlso: AH=65h,INT 10/AX=5001h,INT 2F/AX=110Ch,INT 2F/AX=1404h
  2114.  
  2115. Format of PCDOS 2.x country info:
  2116. Offset    Size    Description
  2117.  00h    WORD    date format  0 = USA    mm dd yy
  2118.                  1 = Europe dd mm yy
  2119.                  2 = Japan    yy mm dd
  2120.  02h    BYTE    currency symbol
  2121.  03h    BYTE    00h
  2122.  04h    BYTE    thousands separator char
  2123.  05h    BYTE    00h
  2124.  06h    BYTE    decimal separator char
  2125.  07h    BYTE    00h
  2126.  08h 24 BYTEs    reserved
  2127.  
  2128. Format of MSDOS 2.x,DOS 3+ country info:
  2129. Offset    Size    Description
  2130.  00h    WORD    date format (see above)
  2131.  02h  5 BYTEs    ASCIZ currency symbol string
  2132.  07h  2 BYTEs    ASCIZ thousands separator
  2133.  09h  2 BYTEs    ASCIZ decimal separator
  2134.  0Bh  2 BYTEs    ASCIZ date separator
  2135.  0Dh  2 BYTEs    ASCIZ time separator
  2136.  0Fh    BYTE    currency format
  2137.         bit 2 = set if currency symbol replaces decimal point
  2138.         bit 1 = number of spaces between value and currency symbol
  2139.         bit 0 = 0 if currency symbol precedes value
  2140.             1 if currency symbol follows value
  2141.  10h    BYTE    number of digits after decimal in currency
  2142.  11h    BYTE    time format
  2143.         bit 0 = 0 if 12-hour clock
  2144.             1 if 24-hour clock
  2145.  12h    DWORD    address of case map routine
  2146.         (FAR CALL, AL = character to map to upper case [>= 80h])
  2147.  16h  2 BYTEs    ASCIZ data-list separator
  2148.  18h 10 BYTEs    reserved
  2149.  
  2150. Values for country code:
  2151.  001h    United States
  2152.  002h    Canadian-French
  2153.  003h    Latin America
  2154.  01Fh    Netherlands
  2155.  020h    Belgium
  2156.  021h    France
  2157.  022h    Spain
  2158.  024h    Hungary (not supported by DR-DOS 5.0)
  2159.  026h    Yugoslavia (not supported by DR-DOS 5.0)
  2160.  027h    Italy
  2161.  029h    Switzerland
  2162.  02Ah    Czechoslovakia (not supported by DR-DOS 5.0)
  2163.  02Bh    Austria (DR-DOS 5.0)
  2164.  02Ch    United Kingdom
  2165.  02Dh    Denmark
  2166.  02Eh    Sweden
  2167.  02Fh    Norway
  2168.  030h    Poland (not supported by DR-DOS 5.0)
  2169.  031h    Germany
  2170.  037h    Brazil (not supported by DR-DOS 5.0)
  2171.  03Dh    International English [Australia in DR-DOS 5.0]
  2172.  051h    Japan (DR-DOS 5.0)
  2173.  052h    Korea (DR-DOS 5.0)
  2174.  15Fh    Portugal
  2175.  166h    Finland
  2176.  311h    Middle East (DR-DOS 5.0)
  2177.  3CCh    Israel (DR-DOS 5.0)
  2178. ----------2138-------------------------------
  2179. INT 21 - DOS 3+ - SET COUNTRY CODE
  2180.     AH = 38h
  2181.     AL = 01h thru 0FEh for specific country with code <255
  2182.     AL = FFh for specific country with code >= 255
  2183.        BX = 16-bit country code
  2184.     DX = FFFFh
  2185. Return: CF set on error
  2186.         AX = error code (see AH=59h)
  2187.     CF clear if successful
  2188. Note:    not supported by OS/2
  2189. SeeAlso: INT 2F/AX=1403h
  2190. ----------2139-------------------------------
  2191. INT 21 - DOS 2+ - "MKDIR" - CREATE SUBDIRECTORY
  2192.     AH = 39h
  2193.     DS:DX -> ASCIZ pathname
  2194. Return: CF clear if successful
  2195.         AX destroyed
  2196.     CF set on error
  2197.         AX = error code (03h,05h) (see AH=59h)
  2198. Notes:    all directories in the given path except the last must exist
  2199.     fails if the parent directory is the root and is full
  2200.     DOS 2.x-3.3 allow the creation of a directory sufficiently deep that
  2201.       it is not possible to make that directory the current directory
  2202.       because the path would exceed 64 characters
  2203.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2204. SeeAlso: AH=3Ah,AH=3Bh,AH=E2h/SF=0Ah,INT 2F/AX=1103h
  2205. ----------213A-------------------------------
  2206. INT 21 - DOS 2+ - "RMDIR" - REMOVE SUBDIRECTORY
  2207.     AH = 3Ah
  2208.     DS:DX -> ASCIZ pathname of directory to be removed
  2209. Return: CF clear if successful
  2210.         AX destroyed
  2211.     CF set on error
  2212.         AX = error code (03h,05h,06h,10h) (see AH=59h)
  2213. Notes:    directory must be empty (contain only '.' and '..' entries)
  2214.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2215. SeeAlso: AH=39h,AH=3Bh,AH=E2h/SF=0Bh,INT 2F/AX=1101h
  2216. ----------213B-------------------------------
  2217. INT 21 - DOS 2+ - "CHDIR" - SET CURRENT DIRECTORY
  2218.     AH = 3Bh
  2219.     DS:DX -> ASCIZ pathname to become current directory (max 64 bytes)
  2220. Return: CF clear if successful
  2221.         AX destroyed
  2222.     CF set on error
  2223.         AX = error code (03h) (see AH=59h)
  2224. Notes:    if new directory name includes a drive letter, the default drive is
  2225.       not changed, only the current directory on that drive
  2226.     changing the current directory also changes the directory in which
  2227.       FCB file calls operate
  2228.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2229. SeeAlso: AH=47h,INT 2F/AX=1105h
  2230. ----------213C-------------------------------
  2231. INT 21 - DOS 2+ - "CREAT" - CREATE OR TRUNCATE FILE
  2232.     AH = 3CH
  2233.     CX = file attribute
  2234.         bit 0: read-only
  2235.         1: hidden
  2236.         2: system
  2237.         3: volume label (ignored)
  2238.         4: reserved, must be zero (directory)
  2239.         5: archive bit
  2240.         7: if set, file is shareable under Novell NetWare
  2241.     DS:DX -> ASCIZ filename
  2242. Return: CF clear if successful
  2243.         AX = file handle
  2244.     CF set on error
  2245.         AX = error code (03h,04h,05h) (see AH=59h)
  2246. Notes:    if a file with the given name exists, it is truncated to zero length
  2247.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2248. SeeAlso: AH=16h,AH=3Dh,AH=5Ah,AH=5Bh,AH=93h
  2249. ----------213D-------------------------------
  2250. INT 21 - DOS 2+ - "OPEN" - OPEN EXISTING FILE
  2251.     AH = 3Dh
  2252.     AL = access and sharing modes
  2253.         bits 2-0: access mode
  2254.         000 read only
  2255.         001 write only
  2256.         010 read/write
  2257.         bit 3: reserved (0)
  2258.         bits 6-4: sharing mode (DOS 3+)
  2259.         000 compatibility mode
  2260.         001 "DENYALL" prohibit both read and write access by others
  2261.         010 "DENYWRITE" prohibit write access by others
  2262.         011 "DENYREAD" prohibit read access by others
  2263.         100 "DENYNONE" allow full access by others
  2264.         bit 7: inheritance
  2265.         if set, file is private to current process and will not be
  2266.           inherited by child processes
  2267.     DS:DX -> ASCIZ filename
  2268.     CL = attribute mask of files to look for (server call only)
  2269. Return: CF clear if successful
  2270.         AX = file handle
  2271.     CF set on error
  2272.         AX = error code (01h,02h,03h,04h,05h,0Ch) (see AH=59h)
  2273. Notes:    file pointer is set to start of file
  2274.     file handles which are inherited from a parent also inherit sharing
  2275.       and access restrictions
  2276.     files may be opened even if given the hidden or system attributes
  2277.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2278. SeeAlso: AH=0Fh,AH=3Ch,AX=4301h,AX=5D00h,INT 2F/AX=1226h
  2279.  
  2280. File sharing behavior:
  2281.       |    Second and subsequent Opens
  2282.  First      |Compat  Deny      Deny     Deny    Deny
  2283.  Open      |       All      Write     Read    None
  2284.       |R W RW R W RW R W RW R W RW R W RW
  2285.  - - - - -| - - - - - - - - - - - - - - - - -
  2286.  Compat    R |Y Y Y  N N N     1 N N    N N N  1 N N
  2287.     W |Y Y Y  N N N     N N N    N N N  N N N
  2288.     RW|Y Y Y  N N N     N N N    N N N  N N N
  2289.  - - - - -|
  2290.  Deny    R |C C C  N N N     N N N    N N N  N N N
  2291.  All    W |C C C  N N N     N N N    N N N  N N N
  2292.     RW|C C C  N N N     N N N    N N N  N N N
  2293.  - - - - -|
  2294.  Deny    R |2 C C  N N N     Y N N    N N N  Y N N 
  2295.  Write    W |C C C  N N N     N N N    Y N N  Y N N 
  2296.     RW|C C C  N N N     N N N    N N N  Y N N
  2297.  - - - - -|
  2298.  Deny    R |C C C  N N N     N Y N    N N N  N Y N
  2299.  Read    W |C C C  N N N     N N N    N Y N  N Y N
  2300.     RW|C C C  N N N     N N N    N N N  N Y N
  2301.  - - - - -|
  2302.  Deny    R |2 C C  N N N     Y Y Y    N N N  Y Y Y
  2303.  None    W |C C C  N N N     N N N    Y Y Y  Y Y Y
  2304.     RW|C C C  N N N     N N N    N N N  Y Y Y
  2305. Legend: Y = open succeeds, N = open fails with error code 05h
  2306.     C = open fails, INT 24 generated
  2307.     1 = open succeeds if file read-only, else fails with error code
  2308.     2 = open succeeds if file read-only, else fails with INT 24
  2309. ----------213DFF-----------------------------
  2310. INT 21 - VIRUS - "JD-448" - INSTALLATION CHECK
  2311.     AX = 3DFFh
  2312. Return: AX = 4A44h if resident
  2313. SeeAlso: AX=357Fh,AX=4203h
  2314. ----------213E-------------------------------
  2315. INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE
  2316.     AH = 3Eh
  2317.     BX = file handle
  2318. Return: CF clear if successful
  2319.         AX destroyed
  2320.     CF set on error
  2321.         AX = error code (06h) (see AH=59h)
  2322. Note:    if the file was written to, any pending disk writes are performed, the
  2323.       time and date stamps are set to the current time, and the directory
  2324.       entry is updated
  2325. SeeAlso: AH=10h,AH=3Ch,AH=3Dh,INT 2F/AX=1106h,INT 2F/AX=1227h
  2326. ----------213F-------------------------------
  2327. INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
  2328.     AH = 3Fh
  2329.     BX = file handle
  2330.     CX = number of bytes to read
  2331.     DS:DX -> buffer for data
  2332. Return: CF clear if successful
  2333.         AX = number of bytes actually read (0 if at EOF before call)
  2334.     CF set on error
  2335.         AX = error code (05h,06h) (see AH=59h)
  2336. Notes:    data is read beginning at current file position, and the file position
  2337.       is updated after a successful read
  2338.     the returned AX may be smaller than the request in CX if a partial
  2339.       read occurred
  2340.     if reading from CON, read stops at first CR
  2341.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2342. SeeAlso: AH=27h,AH=40h,AH=93h,INT 2F/AX=1108h,INT 2F/AX=1229h
  2343. ----------213F-------------------------------
  2344. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - READ STATUS BLOCK
  2345.     AH = 3Fh
  2346.     BX = handle for character device "TDHDEBUG"
  2347.     CX = number of bytes to read
  2348.     DS:DX -> buffer for status block (see below)
  2349. Return: CF clear if successful
  2350.         AX = number of bytes actually read
  2351.     CF set on error
  2352.         AX = error code (05h,06h) (see AH=59h)
  2353. SeeAlso: AH=40h"Turbo Debug"
  2354.  
  2355. Format of status block:
  2356. Offset    Size    Description
  2357.  00h    BYTE    status of command
  2358.         00h successful
  2359.         01h invalid handle
  2360.         02h no more breakpoints available
  2361.         03h hardware does not support specified breakpoint type
  2362.         04h previous command prevents execution
  2363.         05h debugger hardware not found
  2364.         06h hardware failure
  2365.         07h invalid command
  2366.         08h driver not initialized yet
  2367.         FEh recursive entry (hardware breakpoint inside hw bp handler)
  2368. ---status for command 01h---
  2369.  01h    WORD    device driver interface version number (currently 1)
  2370.  03h    WORD    device driver software version
  2371.  05h    BYTE    maximum simultaneous hardware breakpoints
  2372.  06h    BYTE    configuration bits
  2373.         bit 0: CPU and DMA accesses are distinct
  2374.             1: can detect DMA transfers
  2375.             2: supports data mask
  2376.             3: hardware pass counter on breakpoints
  2377.             4: can match on data as well as addresses
  2378.  07h    BYTE    supported breakpoint types
  2379.         bit 0: memory read
  2380.             1: memory write
  2381.             2: memory read/write
  2382.             3: I/O read
  2383.             4: I/O write
  2384.             5: I/O read/write
  2385.             6: instruction fetch
  2386.  08h    WORD    supported addressing match modes
  2387.         bit 0: any address
  2388.             1: equal to test value
  2389.             2: not equal
  2390.             3: above test value
  2391.             4: below test value
  2392.             5: below or equal
  2393.             6: above or equal
  2394.             7: within range
  2395.             8: outside range
  2396.  0Ah    WORD    supported data matches
  2397.         bit 0: any data
  2398.             1: equal to test value
  2399.             2: not equal
  2400.             3: above test value
  2401.             4: below test value
  2402.             5: below or equal
  2403.             6: above or equal
  2404.             7: within range
  2405.             8: outside range
  2406.  0Ch    BYTE    maximum data match length (01h, 02h, or 04h)
  2407.  0Dh    WORD    size of onboard memory (in K)
  2408.  0Fh    WORD    maximum number of trace-back events
  2409.  11h    WORD    hardware breakpoint enable byte address segment (0000h if not
  2410.         supported)
  2411. ---status for command 04h---
  2412.  01h    BYTE    handle to use when referring to the just-set breakpoint
  2413. ----------213F-------------------------------
  2414. INT 21 - PC/TCP IPCUST.SYS - READ CONFIGURATION DATA
  2415.     AH = 3Fh
  2416.     BX = handle for character device "$IPCUST"
  2417.     CX = number of bytes to read
  2418.     DS:DX -> buffer for configuration data (see below)
  2419. Return: CF clear if successful
  2420.         AX = number of bytes actually read
  2421.     CF set on error
  2422.         AX = error code (05h,06h) (see AH=59h)
  2423. Notes:    if less than the entire data is read or written, the next read/write
  2424.       continues where the previous one ended; IOCTL calls AX=4402h and
  2425.       AX=4403h both reset the location at which the next operation starts
  2426.       to zero
  2427.     the data pointer is also reset to zero if the previous read or write
  2428.       reached or exceeded the end of the data, when the current function
  2429.       is read and the previous was write, or vice versa
  2430. SeeAlso: AH=40h"IPCUST",AX=4402h"IPCUST"
  2431.  
  2432. Format of configuration data:
  2433. Offset    Size    Description
  2434.  00h 12 BYTEs    IPCUST.SYS device driver header
  2435.  12h    BYTE    ???
  2436.  13h    BYTE    ???
  2437.  14h    WORD    ???
  2438.  16h    BYTE    bit flags
  2439.         bit 0: send BS rather than DEL for BackSpace key
  2440.         bit 1: wrap long lines
  2441.  17h    BYTE    ???
  2442.  18h 64 BYTEs    ASCIZ hostname
  2443.  58h 64 BYTEs    ASCIZ domain name
  2444.         (fully qualified domain name is hostname.domain-name)
  2445.  98h 16 BYTEs    ASCIZ username
  2446.  A8h 64 BYTEs    ASCIZ full name
  2447.  E8h 64 BYTEs    ASCIZ office address
  2448. 128h 32 BYTEs    ASCIZ phone number
  2449. 148h    WORD    offset from GMT in minutes
  2450. 14Ah  4 BYTEs    ASCIZ timezone name
  2451. 14Eh    WORD    number of time servers
  2452. 150h  ? DWORDs    IP addresses for time servers (big-endian)
  2453.     ???
  2454. 164h    WORD    number of old-style name servers
  2455. 166h  3 DWORDs    IP addresses for name servers (big-endian)
  2456. 172h    WORD    number of domain name servers
  2457. 174h  3 DWORDs    IP addresses for domain name servers (big-endian)
  2458. 180h    DWORD    IP address of default gateway (big-endian)
  2459. 184h    DWORD    IP address of log server (big-endian)
  2460. 188h    DWORD    IP address of cookie server (big-endian)
  2461. 18Ch    DWORD    IP address of lpr server (big-endian)
  2462. 190h    DWORD    IP address of imagen print server
  2463. 194h 54 BYTEs    ???
  2464. 1E8h    WORD    TCP default window size in bytes
  2465. 1EAh    WORD    TCP low window size
  2466. 1ECh 64 BYTEs    ASCIZ host tabel filename
  2467. 22Ch  2 BYTEs    ???
  2468. 22Eh 80 BYTEs    ASCIZ mail relay host name
  2469. 27Eh    BYTE    ???
  2470. 27Fh    BYTE    ??? bit flags
  2471. 280h 44 BYTEs    ???
  2472. 2ACh    WORD    ???
  2473. 2AEh 202 BYTEs    ???
  2474. ----------2140-------------------------------
  2475. INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE
  2476.     AH = 40h
  2477.     BX = file handle
  2478.     CX = number of bytes to write
  2479.     DS:DX -> data to write
  2480. Return: CF clear if successful
  2481.         AX = number of bytes actually written
  2482.     CF set on error
  2483.         AX = error code (05h,06h) (see AH=59h)
  2484. Notes:    if CX is zero, no data is written, and the file is truncated or
  2485.       extended to the current position
  2486.     data is written beginning at the current file position, and the file
  2487.       position is updated after a successful write
  2488.     the usual cause for AX < CX on return is a full disk
  2489. BUG:    a write of zero bytes will appear to succeed when it actually failed
  2490.       if the write is extending the file and there is not enough disk
  2491.       space for the expanded file (DOS 5.0); one should therefore check
  2492.       whether the file was in fact extended by seeking to 0 bytes from
  2493.       the end of the file (INT 21/AX=4202h/CX=0/DX=0)
  2494.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2495. SeeAlso: AH=28h,AH=3Fh,AH=93h,INT 2F/AX=1109h
  2496. ----------2140-------------------------------
  2497. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - SEND CMD TO HARDWARE BRKPNT DRIVER
  2498.     AH = 40h
  2499.     BX = handle for character device "TDHDEBUG"
  2500.     CX = number of bytes to write
  2501.     DS:DX -> hardware breakpoint command (see below)
  2502. Return: CF clear if successful
  2503.         AX = number of bytes actually written
  2504.     CF set on error
  2505.         AX = error code (05h,06h) (see AH=59h)
  2506. Note:    results are retrieved by reading from the device
  2507. SeeAlso: AH=3Fh"Turbo Debug"
  2508.  
  2509. Format of hardware breakpoint commands:
  2510. Offset    Size    Description
  2511.  00h    BYTE    command code
  2512.         00h install interrupt vectors
  2513.         01h get hardware capabilities
  2514.         02h enable hardware breakpoints
  2515.         03h disable hardware breakpoints
  2516.         04h set hardware breakpoint
  2517.         05h clear hardware breakpoint
  2518.         06h set I/O base address and reset hardware
  2519.         07h restore interrupt vectors
  2520. ---command code 00h---
  2521.  01h    DWORD    pointer to Turbo Debugger entry point to be jumped to on
  2522.         hardware breakpoint; call with CPU state the same as on
  2523.         the breakpoint except for pushing AX and placing an entry
  2524.         code (FFh if breakout button or breakpoint handle) in AH
  2525. ---command code 04h---
  2526.  01h    BYTE    breakpoint type
  2527.         00h memory read
  2528.         01h memory write
  2529.         02h memory read/write
  2530.         03h I/O read
  2531.         04h I/O write
  2532.         05h I/O read/write
  2533.         06h instruction fetch
  2534.  02h    BYTE    address matching mode
  2535.         00h any address
  2536.         01h equal to test value
  2537.         02h different from test value
  2538.         03h above test value
  2539.         04h below test value
  2540.         05h below or equal to test value
  2541.         06h above or equal to test value
  2542.         07h within inclusive range
  2543.         08h outside specified range
  2544.  03h    DWORD    32-bit linear low address
  2545.  07h    DWORD    32-bit linear high address
  2546.  0Bh    WORD    pass count
  2547.  0Dh    BYTE    data size (01h, 02h, or 04h)
  2548.  0Eh    BYTE    source of matched bus cycle
  2549.         01h CPU
  2550.         02h DMA
  2551.         03h either
  2552.  0Fh    BYTE    data-matching mode
  2553.         00h match any
  2554.         01h equal to test value
  2555.         02h different from test value
  2556.         03h above test value
  2557.         04h below test value
  2558.         05h below or equal to test value
  2559.         06h above or equal to test value
  2560.         07h within specified range
  2561.         08h outside specified range
  2562.  10h    DWORD    low data value
  2563.  14h    DWORD    high data value
  2564.  18h    DWORD    data mask specifying which bits of the data are tested
  2565. ---command code 05h---
  2566.  01h    BYTE    handle of breakpoint to clear (breakpoint returned from command
  2567.         04h)
  2568. ---command code 06h---
  2569.  01h    WORD    base address of hardware debugger board
  2570. ----------2140-------------------------------
  2571. INT 21 - PC/TCP IPCUST.SYS - WRITE CONFIGURATION DATA
  2572.     AH = 40h
  2573.     BX = handle for character device "$IPCUST"
  2574.     CX = number of bytes to write
  2575.     DS:DX -> buffer for configuration data (AH=3Fh"IPCUST")
  2576. Return: CF clear if successful
  2577.         AX = number of bytes actually written
  2578.     CF set on error
  2579.         AX = error code (05h,06h) (see AH=59h)
  2580. Notes:    if less than the entire data is read or written, the next read/write
  2581.       continues where the previous one ended; IOCTL calls AX=4402h and
  2582.       AX=4403h both reset the location at which the next operation starts
  2583.       to zero
  2584.     the data pointer is also reset to zero if the previous read or write
  2585.       reached or exceeded the end of the data, when the current function
  2586.       is read and the previous was write, or vice versa
  2587. SeeAlso: AH=3Fh"IPCUST",AX=4402h"IPCUST"
  2588. ----------214000BX0002-----------------------
  2589. INT 21 - FARTBELL.EXE - INSTALLATION CHECK
  2590.     AX = 4000h
  2591.     BX = 0002h
  2592.     CX = 0000h
  2593.     DS:DX = 0000h:0000h
  2594. Return: CF clear if installed
  2595.         AX = CS of resident code
  2596. Note:    FARTBELL is a joke program by Guenther Thiele which makes various
  2597.       noises when programs output a bell
  2598. SeeAlso: AX=4001h
  2599. ----------214001BX0002-----------------------
  2600. INT 21 - FARTBELL.EXE - FORCE NOISE
  2601.     AX = 4001h
  2602.     BX = 0002h
  2603.     CX = 0000h
  2604.     DS:DX = 0000h:0000h
  2605. Note:    FARTBELL is a joke program by Guenther Thiele which makes various
  2606.       noises when programs output a bell
  2607. SeeAlso: AX=4000h
  2608. ----------2141-------------------------------
  2609. INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
  2610.     AH = 41h
  2611.     DS:DX -> ASCIZ filename (no wildcards, but see below)
  2612.     CL = attribute mask for deletion (server call only, see below)
  2613. Return: CF clear if successful
  2614.         AX destroyed (DOS 3.3) AL seems to be drive of deleted file
  2615.     CF set on error
  2616.         AX = error code (02h,03h,05h) (see AH=59h)
  2617. Notes:    (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  2618.       the filespec must be canonical (as returned by AH=60h), and only
  2619.       files matching the attribute mask in CL are deleted
  2620.     DOS does not erase the file's data; it merely becomes inaccessible
  2621.       because the FAT chain for the file is cleared
  2622.     deleting a file which is currently open may lead to filesystem
  2623.       corruption.  Unless SHARE is loaded, DOS does not close the handles
  2624.       referencing the deleted file, thus allowing writes to a nonexistant
  2625.       file.
  2626.     under DRDOS and DR Multiuser DOS, this function will fail if the file
  2627.       is currently open
  2628.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  2629. SeeAlso: AH=13h,AX=4301h,AX=5D00h,AH=60h,AX=F244h,INT 2F/AX=1113h
  2630. ----------214101DXFFFE-----------------------
  2631. INT 21 - SoftLogic Data Guardian - ???
  2632.     AX = 4101h
  2633.     DX = FFFEh
  2634. Return: AX = 0000h if installed
  2635. Note:    resident code sets several internal variables on this call
  2636. ----------2142-------------------------------
  2637. INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
  2638.     AH = 42h
  2639.     AL = origin of move
  2640.         00h start of file
  2641.         01h current file position
  2642.         02h end of file
  2643.     BX = file handle
  2644.     CX:DX = offset from origin of new file position
  2645. Return: CF clear if successful
  2646.         DX:AX = new file position in bytes from start of file
  2647.     CF set on error
  2648.         AX = error code (01h,06h) (see AH=59h)
  2649. Notes:    for origins 01h and 02h, the pointer may be positioned before the
  2650.       start of the file; no error is returned in that case, but subsequent
  2651.       attempts at I/O will produce errors
  2652.     if the new position is beyond the current end of file, the file will
  2653.       be extended by the next write (see AH=40h)
  2654. SeeAlso: AH=24h,INT 2F/AX=1228h
  2655. ----------214203-----------------------------
  2656. INT 21 - VIRUS - "Shake" - INSTALLATION CHECK
  2657.     AX = 4203h
  2658. Return: AX = 1234h if resident
  2659. SeeAlso: AX=3DFFh,AX=4243h
  2660. ----------214243-----------------------------
  2661. INT 21 - VIRUS - "Invader" - INSTALLATION CHECK
  2662.     AX = 4243h
  2663. Return: AX = 5678h if resident
  2664. SeeAlso: AX=4203h,AX=4B04h
  2665. ----------214300-----------------------------
  2666. INT 21 - DOS 2+ - GET FILE ATTRIBUTES
  2667.     AX = 4300h
  2668.     DS:DX -> ASCIZ filename
  2669. Return: CF clear if successful
  2670.         CX = attributes (see AX=4301h)
  2671.         AX = CX (DR-DOS 5.0)
  2672.     CF set on error
  2673.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2674. Note:    under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  2675. SeeAlso: AX=4301h,AX=4310h,AH=B6h,INT 2F/AX=110Fh
  2676. ----------214301-----------------------------
  2677. INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
  2678.     AX = 4301h
  2679.     CX = new attributes
  2680.         bit 7: shareable (Novell NetWare)
  2681.         6: unused
  2682.         5: archive
  2683.         4: directory
  2684.         3: volume label
  2685.            execute-only (Novell NetWare)
  2686.         2: system
  2687.         1: hidden
  2688.         0: read-only
  2689.     DS:DX -> ASCIZ filename
  2690. Return: CF clear if successful
  2691.         AX destroyed
  2692.     CF set on error
  2693.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2694. Notes:    will not change volume label or directory attribute bits, but will
  2695.       change the other attribute bits of a directory (the directory
  2696.       bit must be cleared to successfully change the other attributes of a
  2697.       directory, but the directory will not be changed to a normal file as
  2698.       a result)
  2699.     MSDOS 4.01 reportedly closes the file if it is currently open
  2700.     for security reasons, the Novell NetWare execute-only bit can never
  2701.       be cleared; the file must be deleted and recreated
  2702.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  2703. SeeAlso: AX=4300h,AX=4311h,INT 2F/AX=110Eh
  2704. ----------214302-----------------------------
  2705. INT 21 - DR-DOS 3.41+ internal - GET ACCESS RIGHTS
  2706.     AX = 4302h
  2707.     DS:DX -> ASCIZ pathname
  2708. Return: CF clear if successful
  2709.         CX = access rights
  2710.         bit 0 owner delete requires password
  2711.         bit 1 owner execution requires password (FlexOS)
  2712.         bit 2 owner write requires password
  2713.         bit 3 owner read requires password
  2714.         bit 4 group delete requires password
  2715.         bit 5 group execution requires password (FlexOS)
  2716.         bit 6 group write requires password
  2717.         bit 7 group read requires password
  2718.         bit 8 world delete requires password
  2719.         bit 9 world execution requires password (FlexOS)
  2720.         bit 10 world write requires password
  2721.         bit 11 world read requires password
  2722.         AX = CX (DR-DOS 5.0)
  2723.     CF set on error
  2724.         AX = error code
  2725. Desc:    Determine which operations the calling program may perform on a
  2726.       specified file without being required to provide a password.
  2727. Notes:    this protection scheme has been coordinated on all current Digital
  2728.       Research/Novell operating systems (DR-DOS 3.41+, DRMDOS 5.x, and
  2729.       FlexOS 2+)
  2730.     only FlexOS actually uses the "execution" bits; DR-DOS 3.41+ treats
  2731.       them as "read" bits.
  2732.     DR-DOS 3.41-5.x only use bits 0-3.  Only DR-DOS 6.0 using a
  2733.       DRMDOS 5.x security system allowing for users and groups uses bits
  2734.       4-11.
  2735. SeeAlso: AX=4303h
  2736. ----------214303-----------------------------
  2737. INT 21 - DR-DOS 3.41+ internal - SET ACCESS RIGHTS AND PASSWORD
  2738.     AX = 4303h
  2739.     CX = access rights
  2740.          bits 11-0: access rights (see AX=4302h)
  2741.          bit 15: new password is to be set
  2742.     DS:DX -> ASCIZ pathname
  2743.     [DTA] = new password if CX bit 15 is set (blank-padded to 8 characters)
  2744. Return: CF clear if successful
  2745.     CF set on error
  2746.         AX = error code
  2747. Note:    if the file is already protected, the old password must be added after
  2748.       the pathname, separated by a ";"
  2749. SeeAlso: AX=4302h,AX=4454h
  2750. ----------214304-----------------------------
  2751. INT 21 - DR-DOS 5.0 internal - GET ???
  2752.     AX = 4304h
  2753.     ???
  2754. Return: CF clear if successful
  2755.         CX = AX = ???
  2756.     CF set on error
  2757.         AX = error code (see AH=59h)
  2758. SeeAlso: AX=4305h
  2759. ----------214305-----------------------------
  2760. INT 21 - DR-DOS 5.0 internal - SET ???
  2761.     AX = 4305h
  2762.     ???
  2763. Return: CF clear if successful
  2764.     CF set on error
  2765.         AX = error code (see AH=59h)
  2766. SeeAlso: AX=4304h
  2767. ----------214310-----------------------------
  2768. INT 21 - Banyan VINES 2.1+ - GET EXTENDED FILE ATTRIBUTES
  2769.     AX = 4310h
  2770.     DS:DX -> ASCIZ filename
  2771. Return: CF clear if successful
  2772.         CH = attributes (see AX=4311h)
  2773.     CF set on error
  2774.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2775. Note:    the filename may be a directory but must be on a VINES file service
  2776. SeeAlso: AX=4300h,AX=4311h,AH=B6h,INT 2F/AX=110Fh
  2777. ----------214311-----------------------------
  2778. INT 21 - Banyan VINES 2.1+ - SET EXTENDED FILE ATTRIBUTES
  2779.     AX = 4311h
  2780.     CH = new attributes
  2781.         bit 7: unused
  2782.         bit 6: shareable
  2783.         bit 5: execute-only
  2784.         bits 4-0: unused
  2785.     DS:DX -> ASCIZ filename
  2786. Return: CF clear if successful
  2787.     CF set on error
  2788.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  2789. Note:    the filename may be a directory but must be on a VINES file service
  2790. SeeAlso: AX=4301h,AX=4310h,INT 2F/AX=110Eh
  2791. ----------214400-----------------------------
  2792. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  2793.     AX = 4400h
  2794.     BX = handle
  2795. Return: CF clear if successful
  2796.         DX = device information word
  2797.         character device
  2798.           14: device driver can process IOCTL requests (see AX=4402h)
  2799.           13: output until busy supported
  2800.           11: driver supports OPEN/CLOSE calls
  2801.            7: set (indicates device)
  2802.            6: EOF on input
  2803.            5: raw (binary) mode
  2804.            4: device is special (uses INT 29)
  2805.            3: clock device
  2806.            2: NUL device
  2807.            1: standard output
  2808.            0: standard input
  2809.         disk file
  2810.           15: file is remote (DOS 3+)
  2811.           14: don't set file date/time on closing (DOS 3+)
  2812.           11: media not removable
  2813.            8: (DOS 4+) generate INT 24 if no disk space on write
  2814.            7: clear (indicates file)
  2815.            6: file has not been written
  2816.          5-0: drive number (0 = A:)
  2817.         AX destroyed
  2818.     CF set on error
  2819.         AX = error code (01h,05h,06h) (see AH=59h)
  2820. Note:    value in DH corresponds to high byte of device driver's attribute word
  2821.       if handle refers to a character device
  2822. SeeAlso: AX=4401h,INT 2F/AX=122Bh
  2823. ----------214401-----------------------------
  2824. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  2825.     AX = 4401h
  2826.     BX = handle (must refer to character device)
  2827.     DX = device information word (see AX=4400h)
  2828.         (DH must be zero)
  2829. Return: CF clear if successful
  2830.     CF set on error
  2831.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2832. SeeAlso: AX=4400h,INT 2F/AX=122Bh
  2833. ----------214402-----------------------------
  2834. INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
  2835.     AX = 4402h
  2836.     BX = file handle referencing character device
  2837.     CX = number of bytes to read
  2838.     DS:DX -> buffer
  2839. Return: CF clear if successful
  2840.         AX = number of bytes actually read
  2841.     CF set on error
  2842.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2843. Note:    format of data is driver-specific (see below for some specific cases)
  2844. SeeAlso: AX=4400h,AX=4403h,AX=4404h,INT 2F/AX=122Bh
  2845. ----------214402-----------------------------
  2846. INT 21 - Network Driver Interface Spec 2.0.1 - PROTOCOL MANAGER
  2847.     AX = 4402h
  2848.     BX = file handle for device "PROTMAN$"
  2849.     DS:DX -> request block (see below)
  2850.     CX = 000Eh (size of request block)
  2851.  
  2852. Format of request block for GetProtocolManagerInfo:
  2853. Offset    Size    Description
  2854.  00h    WORD    01h
  2855.  02h    WORD    returned status (see below)
  2856.  04h    DWORD    returned pointer to structure representing parsed user config
  2857.  08h    DWORD    unused
  2858.  0Ch    WORD    returned BCD version of NDIS on which Protocol Manager is based
  2859.  
  2860. Format of request block for RegisterModule:
  2861. Offset    Size    Description
  2862.  00h    WORD    02h
  2863.  02h    WORD    returned status (see below)
  2864.  04h    DWORD    pointer to module's common characteristics table (see below)
  2865.  08h    DWORD    pointer to list of modules to which the module is to be bound
  2866.  0Ch    WORD    unused
  2867.  
  2868. Format of request block for BindAndStart:
  2869. Offset    Size    Description
  2870.  00h    WORD    03h
  2871.  02h    WORD    returned status (see below)
  2872.  04h    DWORD    caller's virtual address in FailingModules structure
  2873.  08h    DWORD    unused
  2874.  0Ch    WORD    unused
  2875.  
  2876. Format of request block for GetProtocolManagerLinkage:
  2877. Offset    Size    Description
  2878.  00h    WORD    04h
  2879.  02h    WORD    returned status (see below)
  2880.  04h    DWORD    returned dispatch point
  2881.  08h    DWORD    unused
  2882.  0Ch    WORD    returned protocol manager DS
  2883. Note:    the dispatch point may be called as follows instead of using this IOCTL
  2884.     STACK: WORD  protocol manager DS
  2885.            DWORD pointer to request block
  2886.     Return: AX = returned status
  2887.         STACK popped
  2888.  
  2889. Format of request block for GetProtocolIniPath:
  2890. Offset    Size    Description
  2891.  00h    WORD    05h
  2892.  02h    WORD    returned status (see below)
  2893.  04h    DWORD    pointer to a buffer for the ASCIZ pathname of PROTOCOL.INI
  2894.  08h    DWORD    unused
  2895.  0Ch    WORD    buffer length
  2896.  
  2897. Format of request block for RegisterProtocolManagerInfo:
  2898. Offset    Size    Description
  2899.  00h    WORD    06h
  2900.  02h    WORD    returned status (see below)
  2901.  04h    DWORD    pointer to structure containing parsed user config file
  2902.  08h    DWORD    unused
  2903.  0Ch    WORD    length of structure
  2904.  
  2905. Format of request block for InitAndRegister:
  2906. Offset    Size    Description
  2907.  00h    WORD    07h
  2908.  02h    WORD    returned status (see below)
  2909.  04h    DWORD    unused
  2910.  08h    DWORD    poitner to ASCIZ name of the module to be prebind initialized
  2911.  0Ch    WORD    unused
  2912.  
  2913. Format of request block for UnbindAndStop:
  2914. Offset    Size    Description
  2915.  00h    WORD    08h
  2916.  02h    WORD    returned status (see below)
  2917.  04h    DWORD    failing modules as for BindAndStart
  2918.  08h    DWORD    if not 0000h:0000h, pointer to ASCIZ name of module to unbind
  2919.         if 0000h:0000h, terminate a set of previously dynamically
  2920.           bound protocol modules
  2921.  0Ch    WORD    unused
  2922.  
  2923. Format of request block for BindStatus:
  2924. Offset    Size    Description
  2925.  00h    WORD    09h
  2926.  02h    WORD    returned status (see below)
  2927.  04h    DWORD    must be 0000h:0000h
  2928.         on return, points to root tree
  2929.  08h    DWORD    0000h:0000h
  2930.  0Ch    WORD    unused under DOS
  2931.  
  2932. Format of request block for RegisterStatus:
  2933. Offset    Size    Description
  2934.  00h    WORD    0Ah
  2935.  02h    WORD    returned status (0000h, 0008h, 002Ch) (see below)
  2936.  04h    DWORD    0000h:0000h
  2937.  08h    DWORD    pointer to 16-byte ASCIZ module name
  2938.  0Ch    WORD    0000h
  2939. Note:    not supported by the 10NET v5.0 PROTMAN$ driver
  2940.  
  2941. Values of status code:
  2942.  0000h success
  2943.  0001h wait for release--protocol has retained control of the data buffer
  2944.  0002h request queued
  2945.  0003h frame not recognized
  2946.  0004h frame rejected
  2947.  0005h frame should be forwarded
  2948.  0006h out of resource
  2949.  0007h invalid parameter
  2950.  0008h invalid function
  2951.  0009h not supported
  2952.  000Ah hardware error
  2953.  000Bh transmit error
  2954.  000Ch unrecognized destination
  2955.  000Dh buffer too small
  2956.  0020h already started
  2957.  0021h binding incomplete
  2958.  0022h driver not initialized
  2959.  0023h hardware not found
  2960.  0024h hardware failure
  2961.  0025h configuration failure
  2962.  0026h interrupt conflict
  2963.  0027h MAC incompatible
  2964.  0028h initialization failed
  2965.  0029h no binding
  2966.  002Ah network may be disconnected
  2967.  002Bh incompatible OS version
  2968.  002Ch already registered
  2969.  002Dh path not found
  2970.  002Eh insufficient memory
  2971.  002Fh info not found
  2972.  00FFh general failure
  2973.  F000h-FFFFh reserved for vendor-specific codes, treated as general failure
  2974.  
  2975. Format of common characteristics table:
  2976. Offset    Size    Description
  2977.  00h    WORD    size of table in bytes
  2978.  02h    BYTE    NDIS major version
  2979.  03h    BYTE    NDIS minor version
  2980.  04h    WORD    reserved
  2981.  06h    BYTE    module major version
  2982.  07h    BYTE    module minor version
  2983.  08h    DWORD    module function flag bits
  2984.         bit 0: binding at upper boundary supported
  2985.         bit 1: binding at lower boundary supported
  2986.         bit 2: dynamically bound
  2987.         bits 3-31 reserved, must be 0
  2988.  0Ch 16 BYTEs    ASCIZ module name
  2989.  1Ch    BYTE    upper boundary protocol level
  2990.         01h Media Access Control
  2991.         02h Data link
  2992.         03h network
  2993.         04h transport
  2994.         05h session
  2995.         FFh not specified
  2996.  1Dh    BYTE    upper boundary interface type
  2997.         for MACs: 1 = MAC
  2998.         for data links and transports: to be defined
  2999.         for session: 1 = NCB
  3000.         any level: 0 = private (ISV-defined)
  3001.  1Eh    BYTE    lower boundary protocol level
  3002.         00h physical
  3003.         01h Media Access Control
  3004.         02h Data link
  3005.         03h network
  3006.         04h transport
  3007.         05h session
  3008.         FFh not specified
  3009.  1Fh    BYTE    lower boundary interface type
  3010.         same as offset 1Dh
  3011.  20h    WORD    module ID filled in by protocol manager
  3012.  22h    WORD    module DS
  3013.  24h    DWORD    system request entry point
  3014.  28h    DWORD    pointer to service-specific characteristics
  3015.         0000h:0000h if none
  3016.  2Ch    DWORD    pointer to service-specific status
  3017.         0000h:0000h if none
  3018.  30h    DWORD    pointer to upper dispatch table (see below)
  3019.         0000h:0000h if none
  3020.  34h    DWORD    pointer to lower dispatch table (see below)
  3021.         0000h:0000h if none
  3022.  38h    DWORD    reserved, must be 0
  3023.  3Ch    DWORD    reserved, must be 0
  3024. Note:    for compatibility with NDIS 1.x.x, a major version of 00h is
  3025.       interpreted as 01h
  3026.  
  3027. Format of MAC Service-Specific Characteristics Table:
  3028. Offset    Size    Description
  3029.  00h    WORD    length of table in bytes
  3030.  02h 16 BYTEs    ASCIZ MAC type name, "802.3", "802.4", "802.5", "802.6", "DIX",
  3031.         "DIX+802.3", "APPLETALK", "ARCNET", "FDDI", "SDLC", "BSC",
  3032.         "HDLC", or "ISDN"
  3033.  12h    WORD    length of station addresses in bytes
  3034.  14h 16 BYTEs    permanent station address
  3035.  24h 16 BYTEs    current station address
  3036.  34h    DWORD    current functional adapter address (00000000h if none)
  3037.  38h    DWORD    pointer to multicast address list
  3038.  3Ch    DWORD    link speed in bits/sec
  3039.  40h    DWORD    service flags
  3040.         bit 0: supports broadcast
  3041.             1: supports multicast
  3042.             2: supports functional/group addressing
  3043.             3: supports promiscuous mode
  3044.             4: station address software settable
  3045.             5: statistics always current
  3046.             6: supports InitiateDiagnostics
  3047.             7: supports loopback
  3048.             8: MAC does primarily ReceiveChain indications instead of
  3049.                ReceiveLookahead indications
  3050.             9: supports IBM source routing
  3051.            10: supports MAC reset
  3052.            11: supports Open/Close adapter
  3053.            12: supports interrupt request
  3054.            13: supports source routing bridge
  3055.            14: supports GDT virtual addresses (OS/2 version)
  3056.            15: multiple TransferDatas allowed durign a single
  3057.                indication
  3058.            16: MAC normally sets FrameSize = 0 in ReceiveLookahead
  3059.            17-31: reserved, must be 0
  3060.  44h    WORD    maximum frame size which may be both sent and received
  3061.  46h    DWORD    total transmit buffer capacity in bytes
  3062.  4Ah    WORD    transmit buffer allocation block size in bytes
  3063.  4Ch    DWORD    total receive buffer capacity in bytes
  3064.  50h    WORD    receive buffer allocation block size in bytes
  3065.  52h  3 BYTEs    IEEE vendor code
  3066.  55h    BYTE    vendor adapter code
  3067.  56h    DWORD    pointer to ASCIZ vendor adapter description
  3068.  5Ah    WORD    IRQ used by adapter
  3069.  5Ch    WORD    transmit queue depth
  3070.  5Eh    WORD    maximum supported number of data blocks in buffer descriptors
  3071.  60h  N BYTEs    vendor-specific info
  3072.  
  3073. Format of NetBIOS Service-Specific Characteristics Table
  3074. Offset    Size    Description
  3075.  00h    WORD    length of table in bytes
  3076.  02h 16 BYTEs    ASCIZ type name of NetBIOS module
  3077.  12h    WORD    NetBIOS module code
  3078.  14h  N BYTEs    vendor-specific info
  3079.  
  3080. Format of MAC Service-Specific Status Table:
  3081. Offset    Size    Description
  3082.  00h    WORD    length of table in bytes
  3083.  02h    DWORD    seconds since 0:00 1/1/70 when diagnostics last run
  3084.         (FFFFFFFFh = never)
  3085.  06h    DWORD    MAC status bits
  3086.         bits 0-2: 000 hardware not installed
  3087.               001 hardware failed startup diagnostics
  3088.               010 hardware configuration problem
  3089.               011 hardware fault
  3090.               100 operating marginally due to soft faults
  3091.               101 reserved
  3092.               110 reserved
  3093.               111 hardware fully operational
  3094.         bit 3:      MAC bound
  3095.             4:      MAC open
  3096.             5:      diagnostics in progress
  3097.             6-31: reserved
  3098.  0Ah    WORD    current packet filter flags
  3099.         bit 0: directed/multicast or group/functional
  3100.             1: broadcast
  3101.             2: promiscuous
  3102.             3: all source routing
  3103.             4-15: reserved, must be zero
  3104.  0Ch    DWORD    pointer to media-specific status table or 0000h:0000h
  3105.  10h    DWORD    seconds past 0:00 1/1/70 of last ClearStatistics
  3106.  14h    DWORD    total frames received (FFFFFFFFh = not counted)
  3107.  18h    DWORD    frames with CRC error (FFFFFFFFh = not counted)
  3108.  1Ch    DWORD    total bytes received (FFFFFFFFh = not counted)
  3109.  20h    DWORD    frames discarded--no buffer space (FFFFFFFFh = not counted)
  3110.  24h    DWORD    multicast frames received (FFFFFFFFh = not counted)
  3111.  28h    DWORD    broadcast frames received (FFFFFFFFh = not counted)
  3112.  2Ch    DWORD    frames with errors (FFFFFFFFh = not counted)
  3113.  30h    DWORD    overly large frames (FFFFFFFFh = not counted)
  3114.  34h    DWORD    frames less than minimum size (FFFFFFFFh = not counted)
  3115.  38h    DWORD    multicast bytes received (FFFFFFFFh = not counted)
  3116.  3Ch    DWORD    broadcast bytes received (FFFFFFFFh = not counted)
  3117.  40h    DWORD    frames discarded--hardware error (FFFFFFFFh = not counted)
  3118.  44h    DWORD    total frames transmitted (FFFFFFFFh = not counted)
  3119.  48h    DWORD    total bytes transmitted (FFFFFFFFh = not counted)
  3120.  4Ch    DWORD    multicast frames transmitted (FFFFFFFFh = not counted)
  3121.  50h    DWORD    broadcast frames transmitted (FFFFFFFFh = not counted)
  3122.  54h    DWORD    broadcast bytes transmitted (FFFFFFFFh = not counted)
  3123.  58h    DWORD    multicast bytes transmitted (FFFFFFFFh = not counted)
  3124.  5Ch    DWORD    frames not transmitted--timeout (FFFFFFFFh = not counted)
  3125.  60h    DWORD    frames not transmitted--hardware error (FFFFFFFFh = not countd)
  3126.  64h  N BYTEs    vendor-specific info
  3127. ----------214402-----------------------------
  3128. INT 21 U - IBM SYSTEM 36/38 WORKSTATION EMULATION - VDI.SYS - GET ???
  3129.     AX = 4402h
  3130.     BX = handle for character device "GDMS"
  3131.     CX = number of bytes to read (>= 4)
  3132.     DS:DX -> buffer (see below)
  3133. Return: CF set on error
  3134.         AX = error code (see AH=59h)
  3135.     CF clear if successful
  3136.         AX = number of bytes read
  3137.  
  3138. Format of returned data:
  3139. Offset    Size    Description
  3140.  00h  4 BYTEs    ???
  3141.  04h    DWORD    pointer to ???
  3142.  08h  4 BYTEs    ???
  3143. ----------214402-----------------------------
  3144. INT 21 U - LASTBYTE.SYS v1.19 - IOCTL - GET ??? TABLE
  3145.     AX = 4402h
  3146.     BX = handle for device "LA$TBYTE"
  3147.     CX = 0004h
  3148.     DS:DX -> DWORD to hold address of 39-byte table of ???
  3149. Return: CF set on error
  3150.         AX = error code (see AH=59h)
  3151.     CF clear if successful
  3152.         AX = number of bytes read
  3153. Note:    LASTBYTE.SYS is part of "The Last Byte" by Key Software Products
  3154. SeeAlso: AX=4402h"HIGHUMM"
  3155. ----------214402-----------------------------
  3156. INT 21 - HIGHUMM.SYS v1.17+ - IOCTL - GET API ADDRESS
  3157.     AX = 4402h
  3158.     BX = handle for device "KSP$UMM"
  3159.     CX = 0004h
  3160.     DS:DX -> DWORD to hold entry point
  3161. Return: CF set on error
  3162.         AX = error code (see AH=59h)
  3163.     CF clear if successful
  3164.         AX = number of bytes read
  3165. Note:    HIGHUMM.SYS is part of "The Last Byte" by Key Software Products
  3166. SeeAlso: AX=4402h"LASTBYTE"
  3167.  
  3168. Call HIGHUMM.SYS entry point with:
  3169.     AH = 00h allocate UMB (same as XMS function 10h) (see INT 2F/AX=4310h)
  3170.         DX = size in paragraphs
  3171.         Return: BX = segment number (if successful)
  3172.             DX = size of requested block/size of largest block
  3173.     AH = 01h deallocate UMB (same as XMS func 11h) (see INT 2F/AX=4310h)
  3174.         DX = segment number of UMB
  3175.     AH = 02h request a bank-switched memory block
  3176.         DX = size in paragraphs
  3177.         Return: BX = segment number (if successful)
  3178.             DX = size of requested block/size of largest block
  3179.     AH = 03h release a bank-switched memory block
  3180.         DX = segment number
  3181.     AH = 04h transfer data to/from high memory
  3182.         DS:SI -> source
  3183.         ES:DI -> destination
  3184.         CX = length in bytes
  3185.         Note: enables bank-switched memory, does the copy, then disables
  3186.         bank-switched memory
  3187.     AH = 05h get a word from bank-switched memory
  3188.         ES:DI -> word to read
  3189.         Return: DX = word
  3190.     AH = 06h put a word to bank-switched memory
  3191.         ES:DI -> word to write
  3192.         DX = word
  3193.     AH = 07h put a byte to bank-switched memory
  3194.         ES:DI -> byte to write
  3195.         DL = byte
  3196.     AH = 08h enable bank-switched memory
  3197.         DS:SI -> 6-byte status save area
  3198.     AH = 09h disable bank-switched memory
  3199.         DS:SI -> 6-byte save area from enable call (AH=08h)
  3200.     AH = 0Ah assign name to UMB or high bank-switched block
  3201.         DX = segment number
  3202.         DS:SI -> 8-byte blank-padded name
  3203.     AH = 0Bh locate UMB block by name
  3204.         DS:SI -> 8-byte blank-padded name
  3205.         Return: BX = segment number (if successful)
  3206.             DX = size of block
  3207.     AH = 0Ch locate bank-switched block by name
  3208.         DS:SI -> 8-byte blank-padded name
  3209.         Return: BX = segment number (if successful)
  3210.             DX = size of block
  3211. Return: AX = status code
  3212.         0001h successful
  3213.         0000h failed
  3214.         BL = error code
  3215.             80h not implemented
  3216.             B0h insufficient memory, smaller block available
  3217.             B1h insufficient memory, no blocks available
  3218.             B2h invalid segment number
  3219. Note:    only functions 00h and 01h are always available; the remaining
  3220.       functions are only enabled if the proper commandline switch is given
  3221. ----------214402-----------------------------
  3222. INT 21 - SMARTDRV.SYS - IOCTL - GET CACHE STATUS
  3223.     AX = 4402h
  3224.     BX = file handle for device "SMARTAAR"
  3225.     CX = number of bytes to read (min 28h)
  3226.     DS:DX -> buffer for status record (see below)
  3227. Return: CF clear if successful
  3228.         AX = number of bytes actually read
  3229.     CF set on error
  3230.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3231. SeeAlso: AX=4403h"SMARTDRV",INT 2F/AX=4A10h
  3232.  
  3233. Format of SMARTDRV status record:
  3234. Offset    Size    Description
  3235.  00h    BYTE    write-through flag (always 01h)
  3236.  01h    BYTE    writes should be buffered (always 00h)
  3237.  02h    BYTE    cache enabled if 01h
  3238.  03h    BYTE    driver type (01h extended memory, 02h expanded)
  3239.  04h    WORD    clock ticks between cache flushes (currently unused)
  3240.  06h    BYTE    cache contains locked tracks if nonzero
  3241.  07h    BYTE    flush cache on INT 19 reboot if nonzero
  3242.  08h    BYTE    cache full track writes if nonzero
  3243.  09h    BYTE    double buffering (for VDS) state (00h off, 01h on, 02h dynamic)
  3244.  0Ah    DWORD    original INT 13 vector
  3245.  0Eh    BYTE    minor version number
  3246.  0Fh    BYTE    major version number
  3247.  10h    WORD    unused
  3248.  12h    WORD    sectors read            \
  3249.  14h    WORD    sectors already in cache     > may be scaled rather than
  3250.  16h    WORD    sectors already in track buffer /  absolute counts
  3251.  18h    BYTE    cache hit rate in percent
  3252.  19h    BYTE    track buffer hit rate in percent
  3253.  1Ah    WORD    total tracks in cache
  3254.  1Ch    WORD    number of tracks in use
  3255.  1Eh    WORD    number of locked tracks
  3256.  20h    WORD    number of dirty tracks
  3257.  22h    WORD    current cache size in 16K pages
  3258.  24h    WORD    original (maximum) cache size in 16K pages
  3259.  26h    WORD    minimum cache size in 16K pages
  3260.  28h    DWORD    pointer to byte flag to increment for locking cache contents
  3261. ----------214402-----------------------------
  3262. INT 21 - CD-ROM device driver - IOCTL INPUT
  3263.     AX = 4402h
  3264.     BX = file handle referencing character device for CD-ROM driver
  3265.     CX = number of bytes to read
  3266.     DS:DX -> control block (see below)
  3267. Return: CF clear if successful
  3268.         AX = number of bytes actually read
  3269.     CF set on error
  3270.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3271. Note:    the data returned depends on the first byte of the control block; the
  3272.       remainder of the control block is filled by the driver
  3273. SeeAlso: AX=4403h"CD-ROM",INT 2F/AX=0802h
  3274.  
  3275. Format of control block:
  3276. Offset    Size    Description
  3277.  00h    BYTE    data being requested
  3278.         00h device driver header address
  3279.         01h drive head location
  3280.         02h reserved
  3281.         03h error statistics
  3282.         04h audio channel info
  3283.         05h raw drive bytes (uninterpreted and device-specific)
  3284.         06h device status
  3285.         07h sector size
  3286.         08h volume size
  3287.         09h media change status
  3288.         0Ah audio disk info
  3289.         0Bh audio track info
  3290.         0Ch audio Q-Channel info
  3291.         0Dh audio sub-channel info
  3292.         0Eh UPC code
  3293. ---function 00h---
  3294.  01h    DWORD    device driver header address (see also AH=52h)
  3295. ---function 01h---
  3296.  01h    BYTE    addressing mode
  3297.         00h HSG
  3298.         01h Red Book
  3299.  02h    DWORD    current location of drive's head
  3300.         logical sector number in HSG mode
  3301.         frame/second/minute/unused in Red Book mode
  3302.         (HSG sector = minute * 4500 + second * 75 + frame - 150)
  3303. ---function 03h---
  3304.  01h  N BYTEs    undefined as of 5 Aug 88 specification
  3305. ---function 04h---
  3306.  01h    BYTE    input channel (0-3) for output channel 0
  3307.  02h    BYTE    volume for output channel 0
  3308.  03h    BYTE    input channel (0-3) for output channel 1
  3309.  04h    BYTE    volume for output channel 1
  3310.  05h    BYTE    input channel (0-3) for output channel 2
  3311.  06h    BYTE    volume for output channel 2
  3312.  07h    BYTE    input channel (0-3) for output channel 3
  3313.  08h    BYTE    volume for output channel 3
  3314. Notes:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  3315.       right prime; a volume of 00h is off
  3316.     the default setting is for each input channel to be assigned to the
  3317.       same-numbered output channel at full (FFh) volume
  3318. ---function 05h---
  3319.  01h    BYTE    number of bytes read
  3320.  02h 128 BYTEs    buffer for drive bytes
  3321. ---function 06h---
  3322.  01h    DWORD    device parameters
  3323.         bit 0: door open
  3324.             1: door unlocked
  3325.             2: supports raw reading in addition to cooked
  3326.             3: writable
  3327.             4: can play audio/video tracks
  3328.             5: supports interleaving
  3329.             6: reserved
  3330.             7: supports prefetch requests
  3331.             8: supports audio channel control
  3332.             9: supports Red Book addressing in addition to HSG
  3333.            10: audio is playing
  3334. ---function 07h---
  3335.  01h    BYTE    read mode
  3336.         00h cooked
  3337.         01h raw
  3338.  02h    WORD    sector size in bytes
  3339. ---function 08h---
  3340.  01h    DWORD    volume size in sectors
  3341. ---function 09h---
  3342.  01h    BYTE    media change status
  3343.         00h don't know
  3344.         01h media unchanged
  3345.         FFh media has been changed
  3346. ---function 0Ah---
  3347.  01h    BYTE    lowest audio track number
  3348.  02h    BYTE    highest audio track number
  3349.  03h    DWORD    start address of lead-out track (Red Book format)
  3350. --function 0Bh---
  3351.  01h    BYTE    track number (set by caller)
  3352.  02h    DWORD    starting point of track (Red Book format)
  3353.  06h    BYTE    track control info
  3354.         bits 15,14,12: track type (notice: bits not contiguous!)
  3355.             000 two audio channels, no pre-emphasis
  3356.             001 two audio channels with pre-emphasis
  3357.             010 data track
  3358.             100 four audio channels, no pre-emphasis
  3359.             101 four audio channels with pre-emphasis
  3360.             other reserved
  3361.         bit 13: digital copy permitted
  3362. ---function 0Ch---
  3363.  01h    BYTE    CONTROL and ADR byte (as received from drive)
  3364.  02h    BYTE    track number
  3365.  03h    BYTE    point or index
  3366.  04h    BYTE    minute    \
  3367.  05h    BYTE    second     > running time within track
  3368.  06h    BYTE    frame    /
  3369.  07h    BYTE    zero
  3370.  08h    BYTE    "AMIN" or "PMIN"     \
  3371.  09h    BYTE    "ASEC" or "PSEC"      > running time on disk
  3372.  0Ah    BYTE    "AFRAME" or "PFRAME" /
  3373. ---function 0Dh---
  3374.  01h    DWORD    starting frame address (Red Book format)
  3375.  05h    DWORD    transfer address
  3376.  09h    DWORD    number of sectors to read
  3377. Note:    copies 96 bytes of sub-channel info per sector into buffer
  3378. ---function 0Eh---
  3379.  01h    BYTE    CONTROL and ADR byte
  3380.  02h  7 BYTEs    UPC/EAN code (13 BCD digits,low-order nybble of last byte is 0)
  3381.  09h    BYTE    zero
  3382.  0Ah    BYTE    "AFRAME"
  3383. ----------214402-----------------------------
  3384. INT 21 U - Quarterdeck - QEMM-386 v5+ - GET API ENTRY POINT
  3385.     AX = 4402h
  3386.     BX = file handle for device "QEMM386$"
  3387.     CX = 0004h
  3388.     DS:DX -> DWORD buffer for API entry point
  3389. Return: CF clear if successful
  3390.         buffer filled (see INT 67/AH=3Fh for entry point parameters)
  3391.     CF set on error
  3392.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3393. SeeAlso: AX=4402h"HOOKROM",INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  3394. ----------214402-----------------------------
  3395. INT 21 U - Quarterdeck - QEMM-386 v6+ - GET ???
  3396.     AX = 4402h
  3397.     BX = file handle for device "EMMXXXX0"
  3398.     CX = 0006h (size of buffer in bytes)
  3399.     DS:DX -> buffer for ???
  3400.         first byte must be 01h on entry
  3401. Return: CF clear if successful
  3402.         buffer filled (see INT 67/AH=3Fh function 1B00h)
  3403.     CF set on error
  3404.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3405. Note:    this call always returns an error if Windows3 support has been disabled
  3406.       with the NW3 switch to QEMM386.SYS
  3407. SeeAlso: INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  3408. ----------214402-----------------------------
  3409. INT 21 U - Quarterdeck - HOOKROM.SYS - GET HOOKED VECTOR TABLE
  3410.     AX = 4402h
  3411.     BX = file handle for device "HOOKROM$"
  3412.     CX = 0004h
  3413.     DS:DX -> DWORD buffer for address of hooked vector table (see below)
  3414. Return: CF clear if successful
  3415.         DS:DX buffer filled
  3416.     CF set on error
  3417.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3418. SeeAlso: AX=4402h"QEMM"
  3419.  
  3420. Format of hooked vector table entry:
  3421. Offset    Size    Description
  3422.  00h  5 BYTEs    FAR jump to actual interrupt handler
  3423.         (end of table if first byte is not EAh)
  3424.  05h    BYTE    interrupt vector number
  3425. ----------214402-----------------------------
  3426. INT 21 - Advanced SCSI Programming Interface (ASPI) - INTERFACE
  3427.     AX = 4402h
  3428.     BX = file handle for device "SCSIMGR$"
  3429.     CX = 0004h
  3430.     DS:DX -> buffer for function address
  3431. Return: CF clear if successful
  3432.         AX = 0004h
  3433.     CF set on error
  3434.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3435. Note:    the function address is called with the address of a SCSI Request
  3436.       Block on the stack and the caller must clean up the stack
  3437. SeeAlso: AX=440Ch"ASPITAPE",INT 11/AH=FFh"WD7000"
  3438.  
  3439. Format of SCSI Request Block (64 bytes):
  3440. Offset    Size    Description
  3441.  00h    BYTE    request number
  3442.         00h "HA_INQ"     host adapter inquiry
  3443.         01h "GET_TYPE"     get device type
  3444.         02h "EXEC_SIO"     execute SCSI I/O
  3445.         03h "ABORT_SRB"     abort SRB
  3446.         04h "RESET_DEV"     reset SCSI device
  3447.         05h "SET_HAPRMS" set host adapter parameters
  3448.  01h    BYTE    request status
  3449.         00h not done yet
  3450.         02h aborted
  3451.         04h SCSI I/O error
  3452.         80h invalid
  3453.         81h no adapter
  3454.         82h no device attached
  3455.         else status
  3456.  02h    BYTE    host adapter ID
  3457.  03h    BYTE    request flags
  3458.         bit 3: ???
  3459.  04h    DWORD    reserved
  3460. ---request 00h---
  3461.  08h    BYTE    (returned) number of host adapters
  3462.  09h    BYTE    (returned) target adapter ID
  3463.  0Ah 16 BYTEs    (returned) manager ID
  3464.  1Ah 16 BYTEs    (returned) adapter ID
  3465.  2Ah 16 BYTEs    (returned) parameters
  3466. ---request 01h---
  3467.  08h    BYTE    target ID
  3468.  09h    BYTE    logical unit number
  3469.  0Ah    BYTE    (returned) device type
  3470.         01h streamer
  3471. ---request 02h---
  3472.  08h    BYTE    target ID
  3473.  09h    BYTE    logical unit number
  3474.  0Ah    DWORD    data allocation length
  3475.  0Eh    BYTE    sense allocation length
  3476.  0Fh    DWORD    data buffer pointer
  3477.  13h    DWORD    next request pointer (for linking)
  3478.  17h    BYTE    CDB length
  3479.  18h    BYTE    (returned) host adapter status
  3480.         11h select timeout
  3481.         12h data overrun
  3482.         13h bus error
  3483.         14h bus failure
  3484.  19h    BYTE    (returned) target status
  3485.         02h sense data stored in SRB
  3486.         08h target busy
  3487.         18h reservation error
  3488.  1Ah    DWORD    post routine address
  3489.  1Eh    WORD    real mode Post DS
  3490.  20h    DWORD    SRB pointer
  3491.  24h    WORD    reserved
  3492.  26h    DWORD    SRB physical address
  3493.  2Ah 22 BYTEs    SCSIMGR$ workspace
  3494.  40h  N BYTEs    CCB (20-24 bytes)
  3495. ---request 04h---
  3496.  08h    BYTE    target ID
  3497.  09h    BYTE    logical unit number
  3498.  0Ah 14 BYTEs    reserved
  3499.  18h    BYTE    (returned) host adapter status (see above)
  3500.  19h    BYTE    (returned) target status (see above)
  3501.  1Ah    DWORD    post routine address
  3502.  1Eh 34 BYTEs    workspace
  3503.  
  3504. Format of CCB:
  3505. Offset    Size    Description
  3506.  00h    BYTE    command code
  3507.         01h rewind
  3508.         05h get block size limits
  3509.         08h read
  3510.         0Ah write
  3511.         10h write file marks
  3512.         11h SCSI Space (set position?)
  3513.         12h SCSI Inquire
  3514.         19h erase
  3515.         1Bh load/unload media
  3516.  01h    BYTE    flags
  3517.         bits 4-0: vary by function
  3518.         bits 7-5: logical unit number
  3519.  02h    BYTE    "adr_1"
  3520.  03h    BYTE    "adr_0"
  3521.  04h    BYTE    length
  3522.  05h    BYTE    control
  3523.     ...
  3524.  06h/0Ah 14 BYTEs buffer for sense data
  3525. ----------214402-----------------------------
  3526. INT 21 U - Qualitas 386MAX v6.00+ - IOCTL INPUT - GET STATE
  3527.     AX = 4402h
  3528.     BX = file handle for device "386MAX$$"
  3529.     CX = 005Ah
  3530.     DS:DX -> 386MAX state buffer (see below)
  3531. Return: CF clear if successful
  3532.         buffer filled
  3533.         AX = number of bytes actually copied
  3534.     CF set on error
  3535.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3536. Notes:    the buffer must be one byte larger than the value given in CX; if the
  3537.       value is less than 5Ah, only a partial state record will be returned
  3538.     the state is 40h bytes for 386MAX (actually ASTEMM) v2.20 ("386MAX$$"
  3539.       did not exist yet, use "QMMXXXX0" and then "EMMXXXX0" instead) and
  3540.       56h bytes for v5.11.
  3541.     to invoke 386MAX API functions, push DX onto the stack, load DX with
  3542.       the word at offset 25h in the returned state, load all other
  3543.       registers as needed for the desired function, and execute an
  3544.       OUT DX,AL or OUT DX,AX; DX will be set to the pushed value on return
  3545.       if it is not otherwise modified by the API function.
  3546. SeeAlso: AX=4403h"386MAX",INT 67/AH=3Fh
  3547.  
  3548. Format of 386MAX v6.01 state:
  3549. Offset    Size    Description
  3550.  00h    BYTE    version number of state structure (must be set on entry;
  3551.           v6.01 returns an error if not 03h)
  3552.  01h  6 BYTEs    signature "386MAX"
  3553.  07h  4 BYTEs    version string "N;NN" (i.e. "6;01" for v6.01)
  3554.  0Bh    WORD    segment of low-memory portion of 386MAX.SYS
  3555.  0Dh  2 BYTEs    ???
  3556.  0Fh    WORD    segment of ??? memory block or 0000h
  3557.  11h    WORD    bit flags
  3558.         bit 1: ???
  3559.         bit 2: ???
  3560.         bit 3: ??? (cleared by calling INT 67 functions)
  3561.         bit 5: ???
  3562.         bit 6: 386MAX active???
  3563.         bit 7: 386MAX is providing EMS services
  3564.         bit 8: ???
  3565.         bit 9: ??? (see INT 15/AX=2402h)
  3566.         bit 10: ???
  3567.         bit 11: ???
  3568.         bit 12: ???
  3569.         bit 13: QPMS has been used
  3570.         bit 14: ???
  3571.         bit 15: ???
  3572.  13h    WORD    starting address of video memory in K
  3573.  15h  8 BYTEs    ???
  3574.  1Dh    WORD    KBytes extended memory used by 386MAX
  3575.  1Fh  2 BYTEs    ???
  3576.  21h    WORD    ???
  3577.  23h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX INT 15 functions
  3578.  25h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX API functions
  3579.  27h    WORD    ???
  3580.  29h  2 BYTEs    ???
  3581.  2Bh    DWORD    ???
  3582.  2Fh  4 BYTEs    ???
  3583.  33h    WORD    system configuration??? flags
  3584.         bit 1: ROM compressed???
  3585.         bit 3: ???
  3586.         bit 5: 386MAX loaded into high memory
  3587.         bit 11: PC/XT (thus only single 8259 interrupt controller
  3588.                 present, DMA only in 1st megabyte, etc)
  3589.  35h    WORD    ??? bit flags
  3590.  37h  4 BYTEs    ???
  3591.  3Bh    WORD    segment of first MCB in high memory chain???
  3592.  3Dh    WORD    flags
  3593.         bit 2: no DPMI services
  3594.         bit 11: don't backfill holes in video memory area
  3595.         bit 12: don't backfill below video memory???
  3596.  3Fh    WORD    flags
  3597.         bit 7: ???
  3598.  41h    WORD    flags
  3599.         bit 0: Windows3 support enabled
  3600.         bit 8: ???
  3601.  43h  2 BYTEs    ???
  3602.  45h    WORD    amount of memory to report available on INT 15/AH=88h
  3603.  47h  4 BYTEs    ???
  3604.  4Bh    WORD    ???
  3605.  4Dh  2 BYTEs    ???
  3606.  4Fh    WORD    ???
  3607.  51h    WORD    bit flags
  3608.         bit 12: ???
  3609.  53h    DWORD    old INT 21h
  3610.  57h    DWORD    pointer to 386MAX's EMS (INT 67h) handler
  3611.  
  3612. Format of high memory info record:
  3613. Offset    Size    Description
  3614.  00h    WORD    segment address of memory region
  3615.  02h    WORD    size of memory region in paragraphs
  3616.  04h    BYTE    type or flags???
  3617.         00h if locked out
  3618.         02h if EMS page frame
  3619.         04h if high RAM
  3620.         42h if ROM
  3621.  05h    BYTE    ???
  3622.  
  3623. Format of ROM shadowing record:
  3624. Offset    Size    Description
  3625.  00h    WORD    segment of ROM???
  3626.  02h    WORD    segment of ROM???
  3627.  04h  2 BYTEs    ???
  3628.  06h    WORD    size of shadowed ROM in paragraphs
  3629.  08h  4 BYTEs    ???
  3630.  
  3631. Values for memory type:
  3632.  00h unused by EMS
  3633.  01h DOS
  3634.  04h page frame overlapping ROM???
  3635.  80h high memory
  3636.  84h page frame???
  3637.  87h video ROM???
  3638. Note:    the type may be 00h (unused) if the 16K page is split among different
  3639.       uses (such as ROM and high RAM)
  3640.  
  3641. Call 386MAX API (via OUT DX,AL) with:
  3642.     STACK: WORD value for DX
  3643.     AH = 01h get high memory information
  3644.         ES:DI -> buffer for array of high memory info records
  3645.             (see above)
  3646.         Return: CX = number of records placed in buffer
  3647.     AH = 02h get shadowed ROM info???
  3648.         ES:DI -> buffer for array of ROM shadowing records (see above)
  3649.         Return: CX = number of records placed in buffer
  3650.     AH = 03h get 386MAX state
  3651.         ES:DI -> 90-byte buffer for state (see above)
  3652.         Return: AH = 00h (successful)
  3653.             buffer filled
  3654.         Note:    unlike INT 21/AX=4402h"386MAX", this function omits
  3655.               the first byte specifying the state buffer version
  3656.     AH = 04h get memory types???
  3657.         ES:DI -> buffer for memory type info (array of bytes, one per
  3658.             16K page) (see above)
  3659.         Return:    CX = number of bytes placed in buffer
  3660.     AH = 05h get ???
  3661.         AL = subfunction
  3662.             00h invoke INT 15/AX=2401h first
  3663.             01h don't invoke INT 15/AX=2401h first
  3664.         CX = number of bytes to copy (0000h for default)
  3665.         SI = ???
  3666.         ES:DI -> buffer for ???
  3667.         Return: CX = number of bytes actually copied
  3668.             ???
  3669.     AH = 06h get memory speed info
  3670.         ES:DI -> buffer for memory speed records (see below)
  3671.         Return: AH = 00h (successful)
  3672.             CX = number of bytes placed in buffer
  3673.         Note:    this function can take over a second to execute
  3674.     AH = 07h ???
  3675.         ???
  3676.         Return:    ???
  3677.     AH = 08h ???
  3678.         AL = ??? (00h or nonzero)
  3679.     AH = 09h toggle ??? flags
  3680.         BX = bitmask of bits of ??? flags (word at state+11h) to toggle
  3681.         Return: AH = 00h (successful)
  3682.         Note: invokes INT 15/AX=2401h first
  3683.     AH = 0Ah toggle ??? flags
  3684.         BX = bitmask of bits of ??? (word at state+33h) to toggle
  3685.         Return: AH = 00h (successful)
  3686.         Notes:    invokes INT 15/AX=2401h first
  3687.             does ??? if bit 3 on after specified bits are toggled
  3688.     AH = 0Bh toggle ??? flags
  3689.         BX = bitmask of bits of ??? (word at state+35h) to toggle
  3690.         Return: AH = 00h (successful)
  3691.         Note: invokes INT 15/AX=2401h first
  3692.     AH = 0Ch toggle ??? flags
  3693.         BX = bitmask of bits of ??? (word at state+41h) to toggle
  3694.         Return: AH = 00h (successful)
  3695.         Note: invokes INT 15/AX=2401h first
  3696.     AH = 0Dh specify 386MAX high-memory location
  3697.         BX = segment address of high-memory real-mode portion of 386MAX
  3698.         ???
  3699.         Return: AH = status (00h successful)
  3700.             ???
  3701.     AH = 0Eh CRT controller register virtualization
  3702.         AL = subfunction
  3703.             00h allow access to CRTC I/O ports 03B4h/03B5h, 03D4h/03D5h
  3704.             01h trap accesses to CRTC I/O ports
  3705.     AH = 0Fh reboot system
  3706.         Return: never
  3707.     AH = 11h get high memory information
  3708.         ES:DI -> 96-byte buffer for high memory info
  3709.         Return: AH = 00h (successful)
  3710.             ES:DI buffer filled
  3711.         Notes:    each byte in buffer contains bit flags for a 4K page in
  3712.               the A000h-FFFFh region
  3713.                 bit 0: ???
  3714.                 bit 1: physical address same as linear address
  3715.                 bit 2: EMS page frame
  3716.                 bit 6: ???
  3717.             this function can take over a second to execute
  3718.     AH = 12h ???
  3719.         AL = subfunction
  3720.             00h ???
  3721.             01h ???
  3722.         ???
  3723.         Return: AH = 00h (successful) if AL=00h or 01h
  3724.             AH = 8Fh otherwise
  3725.     AH = 13h page protection???
  3726.         AL = subfunction
  3727.             00h set all ??? 4K pages to read-only???
  3728.             01h set all ??? 4K pages to read-write???
  3729.         ???
  3730.         Return: AH = 00h (successful) if AL=00h or 01h
  3731.             AH = 8Fh otherwise
  3732.     AH = 15h ???
  3733.         ???
  3734.         Return: ???
  3735.     AH = 16h get 386MAX memory usage screen
  3736.         ES:DI -> buffer for memory info display
  3737.         CX = size of buffer in bytes
  3738.         Return:    ES:DI buffer filled with '$'-terminated string (if
  3739.                 large enough to hold entire usage screen)
  3740.     AH = 17h Windows 3 startup/termination
  3741.         AL = subfunction
  3742.             00h Windows3 initializing
  3743.             DX (on stack) = Windows startup flags
  3744.             DI = Windows version number (major in upper byte)
  3745.             ES:BX = 0000h:0000h
  3746.             DS:SI = 0000h:0000h
  3747.             Return: CX = 0000h if OK for Windows to load
  3748.                    <> 0 if Windows should not load
  3749.                 ES:BX -> startup info structure
  3750.                 DS:SI -> Virtual86 mode enable/disable callback
  3751.             01h Windows3 terminating
  3752.             ES:BX -> ???
  3753.             DX (on stack) = Windows exit flags
  3754.             Return: ???
  3755.     AH = 18h QPMS (Qualitas Protected Memory Services)
  3756.         AL = subfunction
  3757.             00h get QPMS configuration
  3758.             Return: BX = starting segment of QPMS memory window
  3759.                 CX = number of 4K pages reserved for QPMS???
  3760.                 DX = number of 4K pages in QPMS window???
  3761.             01h map QPMS memory page???
  3762.             BX = 4K page number within memory reserved for QPMS???
  3763.             CL = 4K page number within QPMS memory window???
  3764.             02h mark all QPMS memory read-only
  3765.             03h mark all QPMS memory read-write
  3766.         Return: AH = status (00h,8Ah,8Bh,8Fh)
  3767.     AH = 19h get linear address for physical address
  3768.         EDX = physical address (low word on stack)
  3769.         Return: AH = status
  3770.                 00h successful
  3771.                 EDX = linear address at which physical address
  3772.                     may be accessed
  3773.                 8Bh physical address currently not addressable
  3774.         Note: calls INT 15/AX=2401h first
  3775.     AH = 1Ah set page table entry???
  3776.         EDX = new page table entry??? (low word on stack)
  3777.         ESI = linear address of page???
  3778.         Return: AH = status (00h,8Bh)
  3779.         Note: calls INT 15/AX=2401h first
  3780.     AH = 1Bh get ???
  3781.         Return: AH = status
  3782.             BX = ???
  3783.             CX = ???
  3784.             EDX = physical address of ???
  3785.     AH = 1Ch get original interrupt vector
  3786.         AL = interrupt vector (00h-7Fh)
  3787.         Return: AH = 00h (successful)
  3788.             EDX = original vector before 386MAX loaded (segment in
  3789.                 high word, offset in low word)
  3790.         Note:    no range checking is performed; requests for INTs 80h-
  3791.               FFh will return random values
  3792.     AH = 1Dh display string???
  3793.         SI = ???
  3794.         Return: AH = 00h (successful)
  3795.             ???
  3796.     AH = 1Eh ???
  3797.         ES:DI -> ???
  3798.         ???
  3799.         Return: ???
  3800.     AH = 1Fh ???
  3801.         ???
  3802.         Return: AX = 0000h if successful
  3803.             BX = ??? (0001h for 386MAX v6.01)
  3804.             CL = ???
  3805.             DL = ??? (5Ah for 386MAX v6.01)
  3806.             DH = ??? (00h for 386MAX v6.01)
  3807.             SI = ???
  3808.             ES???:DI -> ???
  3809.     AH = 40h-5Dh EMS services (see INT 67/AH=40h etc)
  3810.     AH = DEh VCPI services (see INT 67/AX=DE00h etc)
  3811. Return: AH = status (as for EMS INT 67 calls)
  3812.         00h successful
  3813.         80h internal error
  3814.         81h hardware malfunction
  3815.         83h invalid handle
  3816.         84h    undefined function
  3817.         8Ah invalid logical page nuber
  3818.         8Bh illegal physical page number
  3819.         8Fh undefined subfunction
  3820.         A4h access denied
  3821.         etc.
  3822.     STACK popped (value placed in DX if no specific return value for DX)
  3823.  
  3824. Format of memory speed record:
  3825. Offset    Size    Description
  3826.  00h    DWORD    page table entry for 4K page
  3827.  04h    WORD    number of microticks (840ns units) required for REP LODSD of
  3828.         entire 4K page
  3829. ----------214402-----------------------------
  3830. INT 21 - PGS1600.DEV - IOCTL - GET CONFIGURATION INFO
  3831.     AX = 4402h
  3832.     BX = file handle for device "PGS1600$"
  3833.     CX = 0018h (size of buffer)
  3834.     DS:DX -> configuration buffer (see below)
  3835. Return: CF clear if successful
  3836.         buffer filled
  3837.         AX = number of bytes actually copied
  3838.     CF set on error
  3839.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3840. Note:    PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  3841.       display adapter, which provides a 1600x1200 monochrome display as
  3842.       well as one of two emulations, MDA or CGA.
  3843. SeeAlso: AX=4403h"PGS1600"
  3844.  
  3845. Format of configuration information:
  3846. Offset    Size    Description
  3847.  00h    WORD    version (high byte = major, low byte = minor)
  3848.  02h    WORD    board initialisation mode
  3849.  04h    WORD    board I/O address
  3850.         03D0h CGA emulation
  3851.         03B0h MDA emulation
  3852.         0390h no emulation
  3853.         0350h no emulation, alternate
  3854.  06h    WORD    emulation buffer segment
  3855.         B800h    CGA emulation
  3856.         B000h    MDA emulation
  3857.         0000h    no emulation
  3858.  08h    WORD    PG1600 graphics buffer segment
  3859.  0Ah    WORD    number of bytes between consecutive graphic rows
  3860.  0Ch    WORD    horizontal pixel size
  3861.  0Eh    WORD    vertical pixel size
  3862.  10h    WORD    horizontal dots per inch
  3863.  12h    WORD    vertical dots per inch
  3864.  14h    WORD    graphics buffer bits per pixel
  3865.  16h    WORD    monitor bits per pixel
  3866. ----------214402-----------------------------
  3867. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  3868.     AX = 4402h
  3869.     BX = file handle referencing device "$IPCUST"
  3870.     CX, DS:DX ignored
  3871. Return: CF clear if successful
  3872.         AX destroyed
  3873.     CF set on error
  3874.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3875. Note:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  3876.       version 2.05.     If less than the entire data is read or written,
  3877.       the next read/write continues where the previous one ended; this
  3878.       call and AX=4403h both reset the location at which the next
  3879.       operation starts to zero
  3880. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4403h"IPCUST"
  3881. ----------214402-----------------------------
  3882. INT 21 - 10NET v5.0 - 10BEUI.DOS - API
  3883.     AX = 4402h
  3884.     BX = file handle referencing device "10BEUI$"
  3885.     DS:DX -> parameter record (see below)
  3886.     CX ignored
  3887. Return: CF clear if successful
  3888.         AX destroyed
  3889.     CF set on error
  3890.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3891. SeeAlso: AX=4402h"10MEMMGR",INT 6F/AH=00h"10NET"
  3892.  
  3893. Format of parameter record:
  3894. Offset    Size    Description
  3895.  00h    WORD    000Ah (function number???)
  3896.  02h    WORD    ???
  3897.  04h    DWORD    pointer to buffer for ???
  3898.  08h  4 BYTEs    ???
  3899.  0Ch    WORD    transfer size
  3900. ----------214402-----------------------------
  3901. INT 21 - 10NET v5.0 - 10MEMMGR.SYS - API
  3902.     AX = 4402h
  3903.     BX = file handle referencing device "MEMMGR0$"
  3904.     DS:DX -> 6-byte buffer for interface info (see below)
  3905.     CX ignored
  3906. Return: CF clear if successful
  3907.         AX destroyed
  3908.     CF set on error
  3909.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3910. SeeAlso: AX=4402h"10BEUI",INT 6F/AH=00h"10NET"
  3911.  
  3912. Format of interface info:
  3913. Offset    Size    Description
  3914.  00h    DWORD    address of entry point (see below)
  3915.  04h    WORD    version (0500h for v5.00)
  3916.  
  3917. Call entry point with:
  3918.     AL = 01h ???
  3919.         BX = ???
  3920.         Return: CF clear if successful
  3921.             CF set on error
  3922.             AX = error code
  3923.     AL = 02h ???
  3924.         ???
  3925.     AL = 03h ???
  3926.         ???
  3927.     AL = 04h set/restore memory allocation strategy
  3928.         BX = subfunction
  3929.         0000h set strategy
  3930.         0001h restore strategy
  3931.         Return: CF clear if successful
  3932.             CF set on error (if function disabled)
  3933.             various registers destroyed
  3934.     AL = other
  3935.         Return: CF set
  3936.             AX = 0000h
  3937.             BL = 01h
  3938. ----------214403-----------------------------
  3939. INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
  3940.     AX = 4403h
  3941.     BX = file handle referencing character device
  3942.     CX = number of bytes to write
  3943.     DS:DX -> data to write
  3944. Return: CF clear if successful
  3945.         AX = number of bytes actually written
  3946.     CF set on error
  3947.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3948. Notes:    format of data is driver-specific (see below for some specific cases)
  3949.     if the file handle refers to "4DOSSTAK", the 4DOS (v2.x-3.03)
  3950.       KEYSTACK.SYS driver will push the specified characters on the
  3951.       keyboard stack; similarly for "NDOSSTAK", the NDOS KEYSTACK.SYS
  3952.       driver will push the characters onto the keyboard stack
  3953. SeeAlso: AX=4400h,AX=4402h,AX=4405h,INT 2F/AX=122Bh,INT 2F/AX=D44Dh
  3954. SeeAlso: INT 2F/AX=D44Fh
  3955. ----------214403-----------------------------
  3956. INT 21 - SMARTDRV.SYS - IOCTL - CACHE CONTROL
  3957.     AX = 4403h
  3958.     BX = handle for device "SMARTAAR"
  3959.     CX = number of bytes to write
  3960.     DS:DX -> SMARTDRV control block (see below)
  3961. Return: CF clear if successful
  3962.         AX = number of bytes actually written
  3963.            = 0000h if control block too small for given command
  3964.     CF set on error
  3965.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  3966. SeeAlso: AX=4402h"SMARTDRV",INT 2F/AX=4A10h
  3967.  
  3968. Format of SMARTDRV control block:
  3969. Offset    Size    Description
  3970.  00h    BYTE    function code
  3971.         00h flush cache
  3972.         01h flush and discard cache
  3973.         02h disable caching (flushes and discards cache first)
  3974.         03h enable caching
  3975.         04h control write caching
  3976.         05h set flushing tick count
  3977.         06h lock cache contents
  3978.         07h unlock cache contents
  3979.         08h set flush-on-reboot flag
  3980.         09h unused
  3981.         0Ah control full-track caching
  3982.         0Bh reduce cache size
  3983.         0Ch increase cache size
  3984.         0Dh set INT 13 chain address
  3985. ---function 04h---
  3986.  01h    BYTE    write caching control action
  3987.         00h turn off write-through
  3988.         01h turn on write-through
  3989.         02h turn off write buffering (also flushes cache)
  3990.         03h turn on write buffering (also flushes cache)
  3991. ---function 05h---
  3992.  01h    WORD    number of timer ticks between cache flushes
  3993. ---function 08h---
  3994.  01h    BYTE    new flush-on-reboot flag (00h off, 01h on)
  3995. ---function 0Ah---
  3996.  01h    BYTE    full-track writes are
  3997.         00h not cached
  3998.         01h cached
  3999. ---functions 0Bh,0Ch---
  4000.  01h    WORD    number of 16K pages by which to increase/reduce cache size
  4001. ---function 0Dh---
  4002.  01h    DWORD    new address to which to chain on INT 13
  4003. Note:    the previous address is not preserved
  4004. ----------214403-----------------------------
  4005. INT 21 - CD-ROM device driver - IOCTL OUTPUT
  4006.     AX = 4403h
  4007.     BX = file handle referencing character device for CD-ROM driver
  4008.     CX = number of bytes to write
  4009.     DS:DX -> control block (see below)
  4010. Return: CF clear if successful
  4011.         AX = number of bytes actually written
  4012.     CF set on error
  4013.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4014. SeeAlso: AX=4402h"CD-ROM",INT 2F/AX=0802h
  4015.  
  4016. Format of control block:
  4017. Offset    Size    Description
  4018.  00h    BYTE    function code
  4019.         00h eject disk
  4020.         01h lock/unlock door
  4021.         02h reset drive
  4022.         03h control audio channel
  4023.         04h write device control string
  4024.         05h close tray
  4025. ---functions 00h,02h,05h---
  4026.  no further fields
  4027. ---function 01h---
  4028.  01h    BYTE    lock function
  4029.         00h unlock door
  4030.         01h lock door
  4031. ---function 03h---
  4032.  01h    BYTE    input channel (0-3) for output channel 0
  4033.  02h    BYTE    volume for output channel 0
  4034.  03h    BYTE    input channel (0-3) for output channel 1
  4035.  04h    BYTE    volume for output channel 1
  4036.  05h    BYTE    input channel (0-3) for output channel 2
  4037.  06h    BYTE    volume for output channel 2
  4038.  07h    BYTE    input channel (0-3) for output channel 3
  4039.  08h    BYTE    volume for output channel 3
  4040. Note:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  4041.       right prime; a volume of 00h is off
  4042. ---function 04h---
  4043.  01h  N BYTEs    bytes to send directly to the CD-ROM drive without
  4044.         interpretation
  4045. ----------214403-----------------------------
  4046. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  4047.     AX = 4403h
  4048.     BX = handle for device "SCSITAPE"
  4049.     CX = number of bytes to write
  4050.     DS:DX -> SCSITAPE control block (see below)
  4051. Return: CF clear if successful
  4052.         AX = number of bytes actually written
  4053.     CF set on error
  4054.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4055. SeeAlso: AX=4405h"ST-01",INT 78/AH=10h
  4056.  
  4057. Format of SCSITAPE control block:
  4058. Offset    Size    Description
  4059.  00h    WORD    command type
  4060.         'F' Format (argument 1 = interleave, argument 2 = format type)
  4061.         'E' Erase
  4062.         'R' Rewind
  4063.         'L' Load
  4064.         'N' No Load
  4065.         'S' Space (argument 1 = count, argument 2 = type)
  4066.         'M' File Mark (argument 1 = count)
  4067.         'A' Reassign 
  4068.  02h    WORD    argument 1
  4069.  04h    WORD    argument 2
  4070.  06h    WORD    segment of command buffer
  4071.  08h    WORD    offset of command buffer
  4072.  0Ah    WORD    length of command buffer
  4073. ----------214403-----------------------------
  4074. INT 21 U - AI Architects - OS/x86??? - API
  4075.     AX = 4403h
  4076.     BX = handle for device "AIA_OS"
  4077.     CX = number of bytes to write (ignored)
  4078.     DS:DX -> 12-byte buffer, first byte is command:
  4079.             81h installation check
  4080.             82h get API entry point
  4081.             84h uninstall
  4082. Return: CF clear if successful
  4083.         AX = number of bytes actually written
  4084.     CF set on error
  4085.         AX = error code (01h,05h,06h,0Ch,0Dh) (see AH=59h)
  4086. Notes:    these functions are only available if the DOS extender was loaded as a
  4087.       device driver in CONFIG.SYS
  4088.     called by TKERNEL (a licensed version of AI Architects/Ergo OS/x86)
  4089. SeeAlso: INT 2F/AX=FBA1h/BX=0081h,INT 2F/AX=FBA1h/BX=0082h
  4090.  
  4091. Format of buffer on return:
  4092. Offset    Size    Description
  4093.  00h  4 BYTEs    signature "IABH"
  4094. ---if func 81h---
  4095.  (no additional fields)
  4096. ---if func 82h---
  4097.  04h    DWORD    pointer to API entry point (see INT 2F/AX=FBA1h/BX=0082h)
  4098. ---if func 84h---
  4099.  04h    WORD    success indicator
  4100.  06h    WORD    segment of ???
  4101.  08h    WORD    segment of ??? memory block to free if nonzero
  4102.  0Ah    WORD    segment of ??? memory block to free if nonzero
  4103. ----------214403-----------------------------
  4104. INT 21 U - Qualitas 386MAX v6.01 - SET STATE
  4105.     AX = 4403h
  4106.     BX = handle for device "386MAX$$"
  4107.     CX = number of bytes to copy (up to 5Ah)
  4108.     DS:DX -> 386MAX state buffer (see AX=4402h"386MAX")
  4109. Return: CF clear if successful
  4110.         AX = number of bytes actually written
  4111.     CF set on error
  4112.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4113. Note:    the first byte of the buffer must be either 01h, 02h, or 03h
  4114.       (specifying the version of the state record) and the buffer must
  4115.       contain CX bytes AFTER the initial byte
  4116. SeeAlso: AX=4402h"386MAX"
  4117. ----------214403-----------------------------
  4118. INT 21 - PGS1600.DEV - IOCTL - SET CONFIGURATION???
  4119.     AX = 4403h
  4120.     BX = file handle for device "PGS1600$"
  4121.     CX = 0018h (size of buffer)
  4122.     DS:DX -> configuration buffer (see AX=4402h"PGS1600")
  4123. Return: CF clear if successful
  4124.         AX = number of bytes actually written
  4125.     CF set on error
  4126.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4127. Note:    PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  4128.       display adapter, which provides a 1600x1200 monochrome display as
  4129.       well as one of two emulations, MDA or CGA.
  4130. SeeAlso: AX=4402h"PGS1600"
  4131. ----------214403-----------------------------
  4132. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  4133.     AX = 4403h
  4134.     BX = file handle referencing device "$IPCUST"
  4135.     CX, DS:DX ignored
  4136. Return: CF clear if successful
  4137.         AX destroyed
  4138.     CF set on error
  4139.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4140. Note:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  4141.       version 2.05.     If less than the entire data is read or written,
  4142.       the next read/write continues where the previous one ended; this
  4143.       call and AX=4402h both reset the location at which the next
  4144.       operation starts to zero
  4145. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4402h"IPCUST"
  4146. ----------214404-----------------------------
  4147. INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
  4148.     AX = 4404h
  4149.     BL = drive number (00h = default, 01h = A:, etc.)
  4150.     CX = number of bytes to read
  4151.     DS:DX -> buffer
  4152. Return: CF clear if successful
  4153.         AX = number of bytes actually read
  4154.     CF set on error
  4155.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4156. Note:    format of data is driver-specific
  4157. SeeAlso: AX=4402h,AX=4405h,INT 2F/AX=122Bh
  4158. ----------214404CX0004-----------------------
  4159. INT 21 - Stacker - GET DEVICE DRIVER ADDRESS AND SET VOLUME NUMBER
  4160.     AX = 4404h
  4161.     CX = 0004h
  4162.     BL = drive number (00h = default, 01h = A:, etc.)
  4163.     DS:DX -> DWORD buffer to receive device driver address
  4164. Note:    In addition to returning the address of the Stacker device driver,
  4165.       this call also sets the volume number at offset 3Eh in the device
  4166.       driver (see INT 25/AX=CDCDh)
  4167. SeeAlso: INT 25/AX=CDCDh
  4168. ----------214404-----------------------------
  4169. INT 21 - Stacker - GET STACVOL FILE SECTORS
  4170.     AX = 4404h
  4171.     BL = drive number (0 is current drive)
  4172.     CX = byte count (i.e., 200h = 1 sector)
  4173.     DS:DX -> buffer (see below)
  4174. Return:    Data Buffer contains the number of sectors requested from the
  4175.       STACVOL physical file for the drive specified.
  4176.  
  4177. Format of stacker buffer:
  4178. Offset    Size    Description
  4179.  00h    WORD    01CDh
  4180.  02h    WORD    sector count
  4181.  04h    DWORD    number of starting sector
  4182.  08h    DWORD    far pointer to Data Buffer
  4183. ----------214404-----------------------------
  4184. INT 21 - DUBLDISK.SYS v2.6 - GET INFO
  4185.     AX = 4404h
  4186.     BL = drive number of DoubleDisk drive (00h = default, 01h = A:, etc.)
  4187.     CX = number of bytes (000Ah-0014h, call ignored otherwise)
  4188.     DS:DX -> data record (see below)
  4189. Return: CF clear if successful
  4190.         AX = number of bytes read
  4191.     CF set on error
  4192.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4193. Program: DUBLDISK.SYS is the device driver portion of DoubleDisk, a disk
  4194.       expander by Vertisoft Systems, Inc.
  4195. Note:    the installation check consists of scanning memory for the signature
  4196.       "FAT 2.6  byte:", which is immediately followed by a data table
  4197. SeeAlso: AX=440Dh
  4198.  
  4199. Format of data record:
  4200. Offset    Size    Description
  4201.  00h    WORD    (call) signature 4444h
  4202.  02h    BYTE    (call) function
  4203.             00h ???
  4204.             01h ???
  4205. ---function 00h---
  4206.  02h    BYTE    (return) ???
  4207.  03h    BYTE    (return) ???
  4208. ---function 01h---
  4209.  02h    WORD    (return) 4444h
  4210.  04h    WORD    allocation unit size???
  4211.  06h    WORD    ???
  4212.  08h    WORD    ???
  4213.  0Ah    BYTE    ???
  4214.  
  4215. Format of signature data table:
  4216. Offset    Size    Description
  4217.  00h  5 BYTEs    ???
  4218.  05h    BYTE    first drive number
  4219.  06h    BYTE    number of drives
  4220.  07h    ???
  4221. ----------214405-----------------------------
  4222. INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
  4223.     AX = 4405h
  4224.     BL = drive number (00h = default, 01h = A:, etc)
  4225.     CX = number of bytes to write
  4226.     DS:DX -> data to write
  4227. Return: CF clear if successful
  4228.         AX = number of bytes actually written
  4229.     CF set on error
  4230.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4231. Note:    format of data is driver-specific
  4232. SeeAlso: AX=4403h,AX=4404h,INT 2F/AX=122Bh
  4233. ----------214405-----------------------------
  4234. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  4235.     AX = 4405h
  4236.     BX = drive number (00h = default, 01h = A:, etc)
  4237.     CX = number of bytes to write
  4238.     DS:DX -> SCSIDISK control block (see AX=4403h"ST-01")
  4239. Return: CF clear if successful
  4240.         AX = number of bytes actually written
  4241.     CF set on error
  4242.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4243. SeeAlso: AX=4403h"ST-01"
  4244. ----------214406-----------------------------
  4245. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  4246.     AX = 4406h
  4247.     BX = file handle
  4248. Return: CF clear if successful
  4249.         AL = input status
  4250.         00h not ready (device) or at EOF (file)
  4251.         FFh ready
  4252.     CF set on error
  4253.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4254. Note:    files may not register as being at EOF if positioned there by AH=42h
  4255. SeeAlso: AX=4407h,INT 2F/AX=122Bh
  4256. ----------214407-----------------------------
  4257. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  4258.     AX = 4407h
  4259.     BX = file handle
  4260. Return: CF clear if successful
  4261.         AL = input status
  4262.         00h not ready
  4263.         FFh ready
  4264.     CF set on error
  4265.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  4266. Note:    for DOS 2+, files are always ready for output, even if the disk is
  4267.       full or no media is in the drive
  4268. SeeAlso: AX=4406h,INT 2F/AX=122Bh
  4269. ----------214408-----------------------------
  4270. INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
  4271.     AX = 4408h
  4272.     BL = drive number (00h = default, 01h = A:, etc)
  4273. Return: CF clear if successful
  4274.         AX = 0000h if removable
  4275.            = 0001h if fixed
  4276.     CF set on error
  4277.         AX = error code (01h,0Fh) (see AH=59h)
  4278. SeeAlso: AX=4400h,AX=4409h,INT 2F/AX=122Bh
  4279. ----------214409-----------------------------
  4280. INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
  4281.     AX = 4409h
  4282.     BL = drive number (00h = default, 01h = A:, etc)
  4283. Return: CF clear if successful
  4284.         DX = device attribute word
  4285.         bit 15: drive is SUBSTituted
  4286.         bit 12: drive is remote
  4287.         bit  9: direct I/O not allowed
  4288.     CF set on error
  4289.         AX = error code (01h,0Fh) (see AH=59h)
  4290. Note:    on local drives, DX bits not listed above are the attribute word from
  4291.       the device driver header (see AH=52h); for remote drives, the other
  4292.       bits appear to be undefined
  4293. SeeAlso: AX=4400h,AX=4408h,AX=440Ah,INT 2F/AX=122Bh
  4294. ----------21440A-----------------------------
  4295. INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
  4296.     AX = 440Ah
  4297.     BX = handle
  4298. Return: CF clear if successful
  4299.         DX = attribute word (as stored in SFT)
  4300.         bit 15: set if remote
  4301.         bit 14: date/time not set on close
  4302.     CF set on error
  4303.         AX = error code (01h,06h) (see AH=59h)
  4304. Note:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  4305.       the file server on which the handle is located in CX
  4306. SeeAlso: AX=4400h,AX=4409h,AH=52h,INT 2F/AX=122Bh
  4307. ----------21440B-----------------------------
  4308. INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
  4309.     AX = 440Bh
  4310.     CX = pause between retries (default 1)
  4311.     DX = number of retries (default 3)
  4312. Return: CF clear if successful
  4313.     CF set on error
  4314.         AX = error code (01h) (see AH=59h)
  4315. Notes:    delay is dependent on processor speed (value in CX specifies number of
  4316.       64K-iteration empty loops to execute)
  4317.     if DX=0000h on entry, the retry count is left unchanged
  4318. SeeAlso: AH=52h,INT 2F/AX=1224h,INT 2F/AX=122Bh
  4319. ----------21440C-----------------------------
  4320. INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
  4321.     AX = 440Ch
  4322.     BX = device handle
  4323.     CH = category code
  4324.         00h unknown (DOS 3.3+)
  4325.         01h COMn: (DOS 3.3+)
  4326.         03h CON (DOS 3.3+)
  4327.         05h LPTn:
  4328.         9Eh Media Access Control driver (STARLITE)
  4329.         00h-7Fh reserved for Microsoft
  4330.         80h-FFh reserved for OEM/user-defined
  4331.     CL = function
  4332.         00h MAC driver Bind (STARLITE)
  4333.         45h set iteration count
  4334.         4Ah select code page
  4335.         4Ch start code-page preparation
  4336.         4Dh end code-page preparation
  4337.         5Fh set display information (DOS 4.0)
  4338.         65h get iteration count
  4339.         6Ah query selected code page
  4340.         6Bh query prepare list
  4341.         7Fh get display information (DOS 4.0)
  4342.     DS:DX -> (DOS) parameter block (see below)
  4343.     SI = parameter to pass to driver (European MSDOS 4.0, OS/2 comp box)
  4344.     DI = parameter to pass to driver (European MSDOS 4.0, OS/2 comp box)
  4345. Return: CF set on error
  4346.         AX = error code (see AH=59h)
  4347.     CF clear if successful
  4348.         DS:DX -> iteration count if CL=65h
  4349.         SI = returned value (European MSDOS 4.0, OS/2 comp box)
  4350.         DI = returned value (European MSDOS 4.0, OS/2 comp box)
  4351.     DS:DX -> (OS/2 comp box) data block
  4352. Note:    bit assignments for function code in CL:
  4353.         bit 7: set to ignore if unsupported, clear to return error
  4354.         bit 6: set if passed to driver, clear if intercepted by DOS
  4355.         bit 5: set if queries data from device, clear if sends command
  4356.         bits 4-0: subfunction
  4357. SeeAlso: AX=440Dh,INT 2F/AX=0802h,INT 2F/AX=122Bh,INT 2F/AX=1A01h
  4358.  
  4359. Format of parameter block for function 00h:
  4360. Offset    Size    Description
  4361.  00h  8 BYTEs    ASCIZ signature "STARMAC"
  4362.  08h    WORD    version
  4363.  0Ah    WORD    flags
  4364.         bit 0: media requires connect or listen request before use
  4365.         bit 1: network is a LAN (broadcast/multicast supported)
  4366.         bit 2: point-to-point network
  4367.  0Ch    WORD    handle for use with MAC driver's private interface (filled in
  4368.         by MAC driver)
  4369.  0Eh    WORD    context
  4370.  10h    WORD    approximate speed in KB/sec (filled in by MAC driver)
  4371.  12h    WORD    approximate cost in cents per hour (filled in by MAC driver)
  4372.  14h    WORD    maximum packet size in bytes (filled in by MAC driver)
  4373.  16h    WORD    addressing format (filled in by MAC driver)
  4374.         0000h general addressing
  4375.         0001h Ethernet addressing
  4376.         0002h Token Ring addressing
  4377.         0003h Token Bus addressing
  4378.  18h    DWORD    Send entry point (filled in by MAC driver)
  4379.  1Ch    DWORD    RegisterEventHandler entry point (filled in by MAC driver)
  4380.  20h    DWORD    SetPacketFilter entry point (filled in by MAC driver)
  4381.  24h    DWORD    UnBind entry point (filled in by MAC driver)
  4382.  
  4383. Format of parameter block for function 45h:
  4384. Offset    Size    Description
  4385.  00h    WORD    number of times output is attempted before driver assumes
  4386.         device is busy
  4387.  
  4388. Format of parameter block for functions 4Ah and 6Ah:
  4389. Offset    Size    Description
  4390.  00h    WORD    length of data
  4391.  02h    WORD    code page ID
  4392.  04h 2N BYTEs    DCBS (double byte character set) lead byte range
  4393.           start/end for each of N ranges (DOS 4.0)
  4394.     WORD    0000h  end of data (DOS 4.0)
  4395.  
  4396. Format of parameter block for function 4Dh:
  4397. Offset    Size    Description
  4398.  00h    WORD    length of data
  4399.  02h    WORD    code page ID
  4400.  
  4401. Format of parameter block for function 4Ch:
  4402. Offset    Size    Description
  4403.  00h    WORD    flags
  4404.         DISPLAY.SYS = 0000h
  4405.         PRINTER.SYS bit 0 clear to prepare downloaded font, set to
  4406.             prepare cartridge selection
  4407.  02h    WORD    length of remainder of parameter block
  4408.  04h    WORD    number of code pages following
  4409.  06h  N WORDs    code page 1,...,N
  4410.  
  4411. Format of parameter block for functions 5Fh and 7Fh:
  4412. Offset    Size    Description
  4413.  00h    BYTE    level (0 for DOS 4.x and 5.0)
  4414.  01h    BYTE    reserved (0)
  4415.  02h    WORD    length of following data (14)
  4416.  04h    WORD    control flags
  4417.           bit 0 set for blink, clear for intensity
  4418.           bits 1 to 15 reserved
  4419.  06h    BYTE    mode type (1=text, 2=graphics)
  4420.  07h    BYTE    reserved (0)
  4421.  08h    WORD    colors
  4422.            0 = monochrome
  4423.            else N bits per pixel
  4424.  0Ah    WORD    pixel columns
  4425.  0Ch    WORD    pixel rows
  4426.  0Eh    WORD    character columns
  4427.  10h    WORD    character rows
  4428.  
  4429. Format of parameter block for function 6Bh:
  4430. Offset    Size    Description
  4431.  00h    WORD    length of following data
  4432.  02h    WORD    number of hardware code pages
  4433.  04h  N WORDs    hardware code pages 1,...,N
  4434.     WORD    number of prepared code pages
  4435.       N WORDs    prepared code pages 1,...,N
  4436. ----------21440C-----------------------------
  4437. INT 21 - Greg Shenaut ASPITAPE.SYS - INTERFACE
  4438.     AX = 440Ch
  4439.     BX = device handle
  4440.     CH = category code
  4441.         07h tape (ASPITAPE.SYS)
  4442.     CL = function
  4443.         01h "mtop" - perform tape operation
  4444.         02h "mtget" - get tape status
  4445.         03h ignore end-of-tape errors
  4446.         04h enable end-of-tape errors
  4447.     DS:DX -> parameter block (see below)
  4448. Return: CF set on error
  4449.         AX = error code (see AH=59h)
  4450.     CF clear if successful
  4451.         DS:DX -> data block
  4452. Notes:    This device driver is a simple DOS interface to the Adaptec Advanced
  4453.       SCSI Programming Interface (ASPI).  It provides the following device
  4454.       names as access to the SCSI tape, 'RMTx' (rewind on close) and
  4455.       'NRMTx' (NO rewind on close) where x can go from 0 to 3.  There may
  4456.       also be the following names 'MTx' and 'NMTx' which default to 1024
  4457.       byte blocks.    The names may also have a '$' appended to try and make
  4458.       them unique from file names of 'RMT0' etc.
  4459.     once opend these devices must be put into RAW mode
  4460. SeeAlso: AX=4402h"ASPI"
  4461.  
  4462. Format of mtop parameter block:
  4463. Offset    Size    Description
  4464.  00h    WORD    operation code
  4465.         00h "MTWEOF" - write an end-of-file record
  4466.         01h "MTFSF" - forward space file
  4467.         02h "MTBSF" - backward space file
  4468.         03h "MTFSR" - forward space record
  4469.         04h "MTBSR" - backward space record
  4470.         05h "MTREW" - rewind
  4471.         06h "MTOFFL" - rewind and unload
  4472.         07h "MTNOP" - perform TEST UNIT READY
  4473.  02h    DWORD    repetition count
  4474.  
  4475. Format of mtget parameter block:
  4476. Offset    Size    Description
  4477.  00h    BYTE    ASPI host ID
  4478.  01h    BYTE    SCSI target ID
  4479.  02h    BYTE    SCSI logical unit number
  4480.  03h    BYTE    device parameters
  4481.         bit 0: drive must use fixed-block read and write
  4482.         bit 7: drive is an ASPI device
  4483.  04h    BYTE    current device state
  4484.         bit 0: device currently opened in buffered mode
  4485.         bit 1: drive currently opened in nonbuffered mode
  4486.         bit 2: rewind drive on last close
  4487.         bit 3: drive has been written on
  4488.         bit 4: drive has been read from
  4489.         bit 5: next read will return 0 bytes
  4490.         bit 6: EOM will resemble EOF
  4491.         bit 7: drive may be busy rewinding
  4492.  05h    BYTE    unit number within driver
  4493.  06h    WORD    fixed block blocksize
  4494.  08h    BYTE    last SCSI status
  4495.  09h    BYTE    last SCSI sense key
  4496.  0Ah    WORD    last SCSI opcode (packed)
  4497.         bits 0-7: SCSI operation (SCSI packet byte 0)
  4498.         bits 8-10: SCSI flags (SCSI packet byte 1)
  4499.         bits 11-12: ASPI "Direction Bits" (ASPI SRB byte 3)
  4500.  0Ch    WORD    residual bytes from SCSI opcode
  4501. ----------21440D-----------------------------
  4502. INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
  4503.     AX = 440Dh
  4504.     BL = drive number (00h=default,01h=A:,etc)
  4505.     CH = category code
  4506.         08h disk drive
  4507.         00h-7Fh reserved for Microsoft
  4508.         80h-FFh reserved for OEM/user-defined
  4509.     CL = function
  4510.         40h set device parameters
  4511.         41h write logical device track
  4512.         42h format and verify logical device track
  4513.         46h (DOS 4+) set volume serial number (see also AH=69h)
  4514.         47h (DOS 4+) set access flag
  4515.         60h get device parameters
  4516.         61h read logical device track
  4517.         62h verify logical device track
  4518.         66h (DOS 4+) get volume serial number (see also AH=69h)
  4519.         67h (DOS 4+) get access flag
  4520.         68h (DOS 5+) sense media type
  4521.     DS:DX -> (DOS) parameter block (see below)
  4522.     SI:DI -> (OS/2 comp box) parameter block (see below)
  4523. Return: CF set on error
  4524.         AX = error code (01h,02h) (see AH=59h)
  4525.     CF clear if successful
  4526.         DS:DX -> data block if CL=60h or CL=61h
  4527. Notes:    DOS 4.01 seems to ignore the high byte of the number of directory
  4528.       entries in the BPB for diskettes.
  4529.     functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5.0
  4530.     the DUBLDISK.SYS v2.6 driver only supports minor codes 60h and 67h
  4531. SeeAlso: AX=440Ch,AH=69h,INT 2F/AX=0802h,INT 2F/AX=122Bh
  4532.  
  4533. Format of parameter block for functions 40h, 60h:
  4534. Offset    Size    Description
  4535.  00h    BYTE    special functions
  4536.         bit 0 set if function to use current BPB, clear if Device
  4537.             BIOS Parameter Block field contains new default BPB
  4538.         bit 1 set if function to use track layout fields only
  4539.             must be clear if CL=60h
  4540.         bit 2 set if all sectors in track same size (should be set)
  4541.         bits 3-7 reserved
  4542.  01h    BYTE    device type
  4543.         00h  320K/360K disk
  4544.         01h  1.2M disk
  4545.         02h  720K disk
  4546.         03h  single-density 8-inch disk
  4547.         04h  double-density 8-inch disk
  4548.         05h  fixed disk
  4549.         06h  tape drive
  4550.         07h  (DOS 3.3+) 1.44M floppy
  4551.         08h  read/write optical disk
  4552.         09h  (DOS 5.0) 2.88M floppy
  4553.         0Ah  other type of block device
  4554.  02h    WORD    device attributes
  4555.         bit 0 set if nonremovable medium
  4556.         bit 1 set if door lock ("changeline") supported
  4557.         bits 2-15 reserved
  4558.  04h    WORD    number of cylinders
  4559.  06h    BYTE    media type
  4560.         for 1.2M drive
  4561.             00h 1.2M disk (default)
  4562.             01h 320K/360K disk
  4563.         F8h for DUBLDISK.SYS v2.6 expanded drives
  4564.         always 00h for other drive types
  4565.  07h 31 BYTEs    device BPB (see AH=53h), bytes after BPB offset 1Eh omitted
  4566.  26h    WORD    number of sectors per track (start of track layout field)
  4567.         not used by function 60h
  4568.  28h  N word pairs: number,size of each sector in track
  4569.  
  4570. Format of parameter block for functions 41h, 61h:
  4571. Offset    Size    Description
  4572.  00h    BYTE    special functions (reserved, must be zero)
  4573.  01h    WORD    number of disk head
  4574.  03h    WORD    number of disk cylinder
  4575.  05h    WORD    number of first sector to read/write
  4576.  07h    WORD    number of sectors
  4577.  09h    DWORD    transfer address
  4578.  
  4579. Format of parameter block for functions 42h, 62h:
  4580. Offset    Size    Description
  4581.  00h    BYTE    reserved, must be zero (DOS <3.2)
  4582.           bit 0=0: format/verify track
  4583.             1: format status call (DOS 3.2+)
  4584.           bits 1-7 reserved, must be zero
  4585.         on return (DOS 4.x):
  4586.           bit 0: set if specified tracks, sectors/track supported
  4587.           bit 1: set if function not supported by BIOS
  4588.           bit 2: set if specified tracks, sectors/track not supported
  4589.           bit 3: set if no disk in drive
  4590.  01h    WORD    number of disk head
  4591.  03h    WORD    number of disk cylinder
  4592.  
  4593. Format of parameter block for functions 46h, 66h:
  4594. Offset    Size    Description
  4595.  00h    WORD    (call) info level (should be 0000h)  !!!
  4596.  02h    DWORD    disk serial number (binary)
  4597.  06h 11 BYTEs    volume label or "NO NAME    "
  4598.  11h  8 BYTEs    filesystem type "FAT12     " or "FAT16   " (CL=66h only)
  4599.  
  4600. Format of parameter block for functions 47h, 67h:
  4601. Offset    Size    Description
  4602.  00h    BYTE    special-function field (must be zero)
  4603.  01h    BYTE    disk-access flag, nonzero if access allowed by driver
  4604.  
  4605. Format of parameter block for function 68h:
  4606. Offset    Size    Description
  4607.  00h    BYTE    01h for default media type, 00h for any other media type
  4608.  01h    BYTE    02h for 720K, 07h for 1.44M, 09h for 2.88M
  4609. ----------21440E-----------------------------
  4610. INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
  4611.     AX = 440Eh
  4612.     BL = drive number (00h=default,01h=A:,etc)
  4613. Return: CF set on error
  4614.         AX = error code (01h,0Fh) (see AH=59h)
  4615.     CF clear if successful
  4616.         AL = 00h block device has only one logical drive assigned
  4617.          1..26 the last letter used to reference the drive (1=A:,etc)
  4618. SeeAlso: AX=440Fh,INT 2F/AX=122Bh
  4619. ----------21440F-----------------------------
  4620. INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
  4621.     AX = 440Fh
  4622.     BL = physical drive number (00h=default,01h=A:,etc))
  4623. Return: CF set on error
  4624.         AX = error code (01h,0Fh) (see AH=59h)
  4625.     CF clear if successful
  4626.         drive now responds to next logical drive number
  4627. Note:    maps logical drives to physical drives, similar to DOS's treatment of
  4628.       a single physical floppy drive as both A: and B:
  4629. SeeAlso: AX=440Eh,INT 2F/AX=122Bh
  4630. ----------214410-----------------------------
  4631. INT 21 - DOS 5.0 - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
  4632.     AX = 4410h
  4633.     BX = handle for device
  4634.     CH = category code (see AX=440Ch)
  4635.     CL = function code
  4636. Return: CF clear if successful
  4637.         AX = 0000h    specified IOCTL function is supported
  4638.     CF set on error
  4639.         AL = 01h    IOCTL capability not available
  4640. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  4641.       standard DOS 3.2 set may use this call first to see whether a
  4642.       particular call is supported
  4643. SeeAlso: AX=440Ch,AX=440Dh,AX=4411h
  4644. ----------214410BXFFFF-----------------------
  4645. INT 21 U - NewSpace - ENABLE DRIVER
  4646.     AX = 4410h
  4647.     BX = FFFFh
  4648. Notes:    NewSpace is a TSR by Isogon Corporation which automatically compresses
  4649.       all files as they are written and decompresses them as they are read
  4650.     compressed files are not accessible unless the driver is enabled
  4651. SeeAlso: AX=4411h/BX=FFFFh
  4652. ----------214411-----------------------------
  4653. INT 21 - DOS 5.0 - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
  4654.     AX = 4411h
  4655.     BL = drive number
  4656.     CH = category code (see AX=440Dh)
  4657.     CL = function code
  4658. Return: CF clear if successful
  4659.         AX = 0000h    specified IOCTL function is supported
  4660.     CF set on error
  4661.         AL = 01h    IOCTL capability not available
  4662. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  4663.       standard DOS 3.2 set may use this call first to see whether a
  4664.       particular call is supported
  4665. SeeAlso: AX=440Ch,AX=440Dh,AX=4410h
  4666. ----------214411BXFFFF-----------------------
  4667. INT 21 U - NewSpace - DISABLE DRIVER
  4668.     AX = 4411h
  4669.     BX = FFFFh
  4670. Notes:    NewSpace is a TSR by Isogon Corporation which automatically compresses
  4671.       all files as they are written and decompresses them as they are read
  4672.     compressed files are not accessible unless the driver is enabled
  4673. SeeAlso: AX=4410h/BX=FFFFh
  4674. ----------214412-----------------------------
  4675. INT 21 - DR-DOS 5+ - DETERMINE DOS TYPE
  4676.     AX = 4412h
  4677.     CF set
  4678. Return: CF set if not DR-DOS
  4679.         AX = error code (see AH=59h)
  4680.     CF clear if DR-DOS
  4681.         DX = AX = version code
  4682.         1060h = ???
  4683.         1063h = DR-DOS 3.41 ???
  4684.         1065h = DR-DOS 5.0
  4685.         1067h = DR-DOS 6.0
  4686. Note:    this call is identical to AX=4452h
  4687. SeeAlso: AX=4452h
  4688. ----------214412BXFFFF-----------------------
  4689. INT 21 U - NewSpace - INSTALLATION CHECK???
  4690.     AX = 4412h
  4691.     BX = FFFFh
  4692. Return: AX = PSP segment of NewRes (resident driver for NewSpace)
  4693.     BX:DX -> ???
  4694.     CX = ???
  4695. SeeAlso: AX=4411h/BX=FFFFh
  4696. ----------214413BXFFFF-----------------------
  4697. INT 21 U - NewSpace - GET ???
  4698.     AX = 4413h
  4699.     BX = FFFFh
  4700. Return: AX = code segment of NewRes (resident driver for NewSpace)
  4701.     BX = offset of ???
  4702. SeeAlso: AX=4412h/BX=FFFFh
  4703. ----------214414-----------------------------
  4704. INT 21 U - DR-DOS 5.0 - SET GLOBAL PASSWORD
  4705.     AX = 4414h
  4706.     DS:DX -> password string (blank-padded to 8 characters)
  4707. Desc:    Specify the master password for accessing files.
  4708. Note:    this call is identical to AX=4454h
  4709. SeeAlso: AX=4454h
  4710. ----------214414BXFFFF-----------------------
  4711. INT 21 U - NewSpace - DEBUGGING DUMP
  4712.     AX = 4414h
  4713.     BX = FFFFh
  4714. Return:    debugging dump written to X:\NEWSPACE.SMP
  4715. SeeAlso: AX=4413h/BX=FFFFh,AX=44FFh/BX=FFFFh
  4716. ----------2144-------------------------------
  4717. INT 21 U - DR-DOS 5.0 - HISTORY BUFFER, SHARE, AND HILOAD CONTROL
  4718.     AH = 44h
  4719.     AL = 16h to 18h
  4720. Note:    these subfunctions are identical to AX=4456h to 4458h
  4721. SeeAlso: AX=4456h,AX=4457h,AX=4458h
  4722. ----------214451-----------------------------
  4723. INT 21 - Concurrent DOS v3.2+ - INSTALLATION CHECK
  4724.     AX = 4451h
  4725. Return: CF set if not Concurrent DOS
  4726.         AX = error code (see AH=59h)
  4727.     CF clear if successful
  4728.         AH = single-tasking/multitasking nature
  4729.         10h single-tasking
  4730.             AL = operating system version ID (see AX=4452h)
  4731.         14h multitasking
  4732.             AL = operating system version ID
  4733.             32h Concurrent PC DOS 3.2
  4734.             41h Concurrent DOS 4.1
  4735.             50h Concurrent DOS/XM 5.0 or Concurrent DOS/386 1.1
  4736.             60h Concurrent DOS/XM 6.0 or Concurrent DOS/386 2.0
  4737.             62h Concurrent DOS/XM 6.2 or Concurrent DOS/386 3.0
  4738.             66h DR Multiuser DOS 5.1
  4739. Notes:    as of Concurrent DOS/XM 5.0 (possibly earlier), the version is stored
  4740.       in the environment variable VER
  4741.     use this function if you are looking for multitasking capabilities,
  4742.       AX=4452h for single-tasking
  4743.     this function should never return the single-tasking values
  4744. SeeAlso: AX=4452h,AX=4459h
  4745. ----------214452-----------------------------
  4746. INT 21 - DR-DOS 3.41+ - DETERMINE DOS TYPE/GET DR-DOS VERSION
  4747.     AX = 4452h
  4748.     CF set
  4749. Return: CF set if not DR-DOS
  4750.         AX = error code (see AH=59h)
  4751.     CF clear if DR-DOS
  4752.         DX = AX = version code
  4753.         AH = single-tasking/multitasking
  4754.         10h single-tasking
  4755.             AL = operating system version ID
  4756.             60h DOS Plus
  4757.             63h DR-DOS 3.41
  4758.             64h DR-DOS 3.42
  4759.             65h DR-DOS 5.00
  4760.             67h DR-DOS 6.00
  4761.         14h multitasking
  4762.             AL = operating system version ID (see AX=4451h)
  4763. Notes:    the DR-DOS version is stored in the environment variable VER
  4764.     use this function if looking for single-tasking capabilities, AX=4451h
  4765.       if looking for multitasking; this call should never return multi-
  4766.       tasking values
  4767. SeeAlso: AX=4412h,AX=4451h,AX=4459h
  4768. ----------214454-----------------------------
  4769. INT 21 U - DR-DOS 3.41+ - SET GLOBAL PASSWORD
  4770.     AX = 4454h
  4771.     DS:DX -> password string (blank-padded to 8 characters)
  4772. Desc:    Specify the master password for accessing files.
  4773. SeeAlso: AX=4303h,AX=4414h
  4774. ----------214456-----------------------------
  4775. INT 21 U - DR-DOS 5.0+ - HISTORY BUFFER CONTROL
  4776.     AX = 4456h
  4777.     DL = flag
  4778.         bit 0: 1 = command history buffers
  4779.            0 = set to application
  4780. Return: AL = ??? (20h if DL bit 0 set, A0h if clear (DR-DOS 6.0))
  4781. Note:    This was seen called by COMMAND.COM of DR-DOS 6.0
  4782. ----------214457-----------------------------
  4783. INT 21 U - DR-DOS 5.0+ - SHARE/HILOAD CONTROL
  4784.     AX = 4457h
  4785.     DH = subfunction
  4786.         00h enable/disable SHARE
  4787.         DL = 00h disable
  4788.            = 01h enable
  4789.            else Return: AX = ???
  4790.         01h get HILOAD status
  4791.         Return: AX = status
  4792.                 0000h off
  4793.                 0001h on
  4794.         02h set HILOAD status
  4795.         DL = new state (00h off, 01h on)
  4796.         Return: AX = ???
  4797.         other
  4798.         Return: AX = ???
  4799. Note:    This was seen called by COMMAND.COM of DR-DOS 6.0
  4800. SeeAlso: AX=4457h/DX=FFFFh
  4801. ----------214457DXFFFF-----------------------
  4802. INT 21 U - DR-DOS 6.0 - GET SHARE STATUS
  4803.     AX = 4457h
  4804.     DX = FFFFh
  4805. Return: AX = SHARE status
  4806. SeeAlso: INT 2F/AX=1000h
  4807. ----------214458-----------------------------
  4808. INT 21 U - DR-DOS 5.0+ internal - GET POINTER TO TABLE OF ???
  4809.     AX = 4458h
  4810. Return: ES:BX -> internal table (see below)
  4811.     AX = ??? (0B50h for DR-DOS 5.0, 0A56h for DR-DOS 6.0)
  4812. SeeAlso: AX=4452h
  4813.  
  4814. Format of internal table:
  4815. Offset    Size    Description
  4816.  00h    DWORD    pointer to ???
  4817.  04h  7 BYTEs    ???
  4818.  0Bh    WORD    K of extended memory at startup
  4819.  0Dh    BYTE    number of far jump entry points
  4820.  0Eh    WORD    segment containing far jumps to DR-DOS entry points (see below)
  4821. ---DR-DOS 6.0---
  4822.  10h    WORD    (only if kernel loaded in HMA) offset in HMA of first free HMA
  4823.         memory block (see below) or 0000h if none; segment is FFFFh
  4824.  12h    WORD    pointer to segment of environment variables set in CONFIG,
  4825.         or 0000h if already used
  4826.  14h    WORD    (only if kernel loaded in HMA) offset in HMA of first used HMA
  4827.         memory block (see below) or 0000h if none; segment is FFFFh
  4828. Note:    the segment used for the DR-DOS 6.0 CONFIG environment variables
  4829.       (excluding COMSPEC, VER and OS) is only useful for programs/drivers
  4830.       called from CONFIG.SYS. The word is set to zero later and the area
  4831.       lost.
  4832.  
  4833. Format of jump table for DR-DOS 5.0-6.0:
  4834. Offset    Size    Description
  4835.  00h  5 BYTEs    far jump to entry point corresponding to CP/M CALL 5
  4836.  05h  5 BYTEs    far jump to entry point corresponding to INT 20
  4837.  0Ah  5 BYTEs    far jump to entry point corresponding to INT 21
  4838.  0Fh  5 BYTEs    far jump to entry point corresponding to ???
  4839.  14h  5 BYTEs    far jump to entry point corresponding to ???
  4840.  19h  5 BYTEs    far jump to entry point corresponding to ???
  4841.  1Eh  5 BYTEs    far jump to entry point corresponding to ???
  4842.  23h  5 BYTEs    far jump to entry point corresponding to ???
  4843.  28h  5 BYTEs    far jump to entry point corresponding to ???
  4844.  2Dh  5 BYTEs    far jump to entry point corresponding to ???
  4845.  32h  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4846.  37h  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4847.  3Ch  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4848.  41h  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4849.  46h  5 BYTEs    far jump to entry point corresponding to ??? (IRET)
  4850.  4Bh  5 BYTEs    far jump to entry point corresponding to ???
  4851.  
  4852. Format of HMA Memory Block (DR-DOS 6.0 kernel loaded in HMA):
  4853. Offset    Size    Description
  4854.  00h    WORD    offset of next HMA Memory Block (0000h if last block)
  4855.  02h    WORD    size of this block in bytes (at least 10h)
  4856.  04h    BYTE    type of HMA Memory Block (interpreted by MEM)
  4857.         00h system
  4858.         01h KEYB
  4859.         02h NLSFUNC
  4860.         03h SHARE
  4861.         04h TaskMAX
  4862.         05h COMMAND
  4863.  05h    var    TSR (or system) code and data. DR-DOS TSR's, such as KEYB,
  4864.         hooks interrupts using segment FFFEh instead FFFFh.
  4865. ----------214459-----------------------------
  4866. INT 21 - DR MultiUser DOS 5.0 - API
  4867.     AX = 4459h
  4868.     CL = function (see INT E0"CP/M")
  4869.     DS,DX = parameters
  4870. Notes:    DR-DOS 5.0 returns CF set and AX=0001h
  4871.     this API is also available on INT E0
  4872. SeeAlso: AX=4452h,INT E0"CP/M"
  4873. ----------2144FFBXFFFF-----------------------
  4874. INT 21 U - NewSpace - ???
  4875.     AX = 44FFh
  4876.     BX = FFFFh
  4877.     DX = ???
  4878. Note:    NewSpace is a TSR by Isogon Corporation which automatically compresses
  4879.       all files as they are written and decompresses them as they are read
  4880. SeeAlso: AX=4414h/BX=FFFFh
  4881. ----------2145-------------------------------
  4882. INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
  4883.     AH = 45h
  4884.     BX = file handle
  4885. Return: CF clear if successful
  4886.         AX = new handle
  4887.     CF set on error
  4888.         AX = error code (04h,06h) (see AH=59h)
  4889. Notes:    moving file pointer for either handle will also move it for the other,
  4890.       because both will refer to the same system file table
  4891.     for DOS versions prior to 3.3, file writes may be forced to disk by
  4892.       duplicating the file handle and closing the duplicate
  4893. SeeAlso: AH=3Dh,AH=46h
  4894. ----------2146-------------------------------
  4895. INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
  4896.     AH = 46h
  4897.     BX = file handle
  4898.     CX = file handle to become duplicate of first handle
  4899. Return: CF clear if successful
  4900.     CF set on error
  4901.         AX = error code (04h,06h) (see AH=59h)
  4902. Notes:    closes file with handle CX if it is still open
  4903.     DOS 3.30 hangs if BX=CX on entry
  4904.     moving file pointer for either handle will also move it for the other,
  4905.       because both will refer to the same system file table
  4906. SeeAlso: AH=3Dh,AH=45h
  4907. ----------2147-------------------------------
  4908. INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
  4909.     AH = 47h
  4910.     DL = drive number (00h = default, 01h = A:, etc)
  4911.     DS:SI -> 64-byte buffer for ASCIZ pathname
  4912. Return: CF clear if successful
  4913.         AX = 0100h (undocumented)
  4914.     CF set on error
  4915.         AX = error code (0Fh) (see AH=59h)
  4916. Notes:    the returned path does not include a drive or the initial backslash
  4917.     many Microsoft products for Windows rely on AX being 0100h on success
  4918.     under the FlashTek X-32 DOS extender, the buffer pointer is in DS:ESI
  4919. SeeAlso: AH=19h,AH=3Bh,INT 15/AX=DE25h
  4920. ----------2148-------------------------------
  4921. INT 21 - DOS 2+ - ALLOCATE MEMORY
  4922.     AH = 48h
  4923.     BX = number of paragraphs to allocate
  4924. Return: CF clear if successful
  4925.         AX = segment of allocated block
  4926.     CF set on error
  4927.         AX = error code (07h,08h) (see AH=59h)
  4928.         BX = size of largest available block
  4929. Notes:    DOS 2.1-5.0 coalesces free blocks while scanning for a block to
  4930.       allocate
  4931.     .COM programs are initially allocated the largest available memory
  4932.       block, and should free some memory with AH=49h before attempting any
  4933.       allocations
  4934.     under the FlashTek X-32 DOS extender, EBX contains a protected-mode
  4935.       near pointer to the allocated block on a successful return
  4936. SeeAlso: AH=49h,AH=4Ah,AH=58h,AH=83h
  4937. ----------2149-------------------------------
  4938. INT 21 - DOS 2+ - FREE MEMORY
  4939.     AH = 49h
  4940.     ES = segment of block to free
  4941. Return: CF clear if successful
  4942.     CF set on error
  4943.         AX = error code (07h,09h) (see AH=59h)
  4944. Notes:    apparently never returns an error 07h, despite official docs; DOS 3.30
  4945.       code contains only an error 09h exit
  4946.     DOS 2.1-5.0 does not coalesce adjacent free blocks when a block is
  4947.       freed, only when a block is allocated or resized
  4948. SeeAlso: AH=48h,AH=4Ah
  4949. ----------214A-------------------------------
  4950. INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
  4951.     AH = 4Ah
  4952.     BX = new size in paragraphs
  4953.     ES = segment of block to resize
  4954. Return: CF clear if successful
  4955.     CF set on error
  4956.         AX = error code (07h,08h,09h) (see AH=59h)
  4957.         BX = maximum paragraphs available for specified memory block
  4958. Notes:    under DOS 2.1-5.0, if there is insufficient memory to expand the block
  4959.       as much as requested, the block will be made as large as possible
  4960.     DOS 2.1-5.0 coalesces any free blocks immediately following the block
  4961.       to be resized
  4962. SeeAlso: AH=48h,AH=49h,AH=83h
  4963. ----------214B-------------------------------
  4964. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  4965.     AH = 4Bh
  4966.     AL = type of load
  4967.         00h load and execute
  4968.         01h load but do not execute
  4969.         03h load overlay
  4970.         04h load and execute in background (European MSDOS 4.0 only)
  4971.         "Exec & Go" (see also AH=80h)
  4972.     DS:DX -> ASCIZ program name (must include extension)
  4973.     ES:BX -> parameter block (see below)
  4974.     CX = mode (subfunction 04h only)
  4975.         0000h child placed in zombie mode after termination
  4976.         0001h child's return code discarded on termination
  4977. Return: CF clear if successful
  4978.         BX,DX destroyed
  4979.         if subfunction 01h, process ID set to new program's PSP; get with
  4980.         INT 21/AH=62h
  4981.     CF set on error
  4982.         AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see AH=59h)
  4983. Notes:    DOS 2.x destroys all registers, including SS:SP
  4984.     for functions 00h and 01h, the calling process must ensure that there
  4985.       is enough unallocated memory available; if necessary, by releasing
  4986.       memory with AH=49h or AH=4Ah
  4987.     for function 01h, the AX value to be passed to the child program is put
  4988.       on top of the child's stack
  4989.     for function 03h, DOS assumes that the overlay is being loaded into
  4990.       memory allocated by the caller
  4991.     function 01h was undocumented prior to the release of DOS 5.0
  4992.     some versions (such as DR-DOS 6.0) check the parameters and parameter
  4993.       block and return an error if an invalid value (such as an offset of
  4994.       FFFFh) is found
  4995.     background programs under European MSDOS 4.0 must use the new
  4996.       executable format
  4997.     new executables begin running with the following register values
  4998.         AX = environment segment
  4999.         BX = offset of command tail in environment segment
  5000.         CX = size of automatic data segment (0000h = 64K)
  5001.         ES,BP = 0000h
  5002.         DS = automatic data segment
  5003.         SS:SP = initial stack
  5004.       the command tail corresponds to an old executable's PSP:0081h and
  5005.       following, except that the 0Dh is turned into a NUL (00h); new
  5006.       format executables have no PSP
  5007.     under the FlashTek X-32 DOS extender, only function 00h is supported
  5008.       and the pointers are passed in DS:EDX and ES:EBX
  5009. BUGS:    DOS 2.00 assumes that DS points at the current program's PSP
  5010.     Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
  5011.       file contains additional data after the actual overlay
  5012. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h"OS/2",AH=8Ah,INT 2E
  5013.  
  5014. Format of EXEC parameter block for AL=00h,01h,04h:
  5015. Offset    Size    Description
  5016.  00h    WORD    segment of environment to copy for child process (copy caller's
  5017.         environment if 0000h)
  5018.  02h    DWORD    pointer to command tail to be copied into child's PSP
  5019.  06h    DWORD    pointer to first FCB to be copied into child's PSP
  5020.  0Ah    DWORD    pointer to second FCB to be copied into child's PSP
  5021.  0Eh    DWORD    (AL=01h) will hold subprogram's initial SS:SP on return
  5022.  12h    DWORD    (AL=01h) will hold entry point (CS:IP) on return
  5023.  
  5024. Format of EXEC parameter block for AL=03h:
  5025. Offset    Size    Description
  5026.  00h    WORD    segment at which to load overlay
  5027.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  5028.  
  5029. Format of EXEC parameter block for FlashTek X-32:
  5030. Offset    Size    Description
  5031.  00h    PWORD    48-bit far pointer to environment string
  5032.  06h    PWORD    48-bit far pointer to command tail string
  5033.  
  5034. Format of .EXE file header:
  5035. Offset    Size    Description
  5036.  00h  2 BYTEs    .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  5037.  02h    WORD    number of bytes in last 512-byte page of executable
  5038.  04h    WORD    total number of 512-byte pages in executable (includes any
  5039.         partial last page)
  5040.  06h    WORD    number of relocation entries
  5041.  08h    WORD    header size in paragraphs
  5042.  0Ah    WORD    minimum paragraphs of memory to allocation in addition to
  5043.         executable's size
  5044.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  5045.  0Eh    WORD    initial SS relative to start of executable
  5046.  10h    WORD    initial SP
  5047.  12h    WORD    checksum (one's complement of sum of all words in executable)
  5048.  14h    DWORD    initial CS:IP relative to start of executable
  5049.  18h    WORD    offset within header of relocation table (40h for New EXE)
  5050.  1Ah    WORD    overlay number (normally 0000h = main program)
  5051. ---new executable---
  5052.  1Ch  4 BYTEs    ???
  5053.  20h    WORD    behavior bits
  5054.  22h 26    BYTEs    reserved for additional behavior info
  5055.  3Ch    DWORD    offset of new executable header within disk file
  5056. ---Borland TLINK---
  5057.  1Ch  2 BYTEs    ??? (apparently always 01h 00h)
  5058.  1Eh    BYTE    signature FBh
  5059.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  5060.  20h  2 BYTEs    ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
  5061. ---ARJ self-extracting archive---
  5062.  1Ch  4 BYTEs    signature "RJSX" (older versions, new signature is "aRJsfX" in
  5063.         the first 1000 bytes of the file)
  5064. ---LZEXE 0.90 compressed executable---
  5065.  1Ch  4 BYTEs    signature "LZ09"
  5066. ---LZEXE 0.91 compressed executable---
  5067.  1Ch  4 BYTEs    signature "LZ91"
  5068. ---PKLITE compressed executable---
  5069.  1Ch    BYTE    minor version number
  5070.  1Dh    BYTE    (low nybble) major version
  5071.         (high nybble) 01h if extra compression
  5072.  1Eh  6 BYTEs    signature "PKLITE" (followed by copyright message)
  5073. ---LHarc 1.x self-extracting archive---
  5074.  1Ch  4 BYTEs    unused???
  5075.  20h  3 BYTEs    jump to start of extraction code
  5076.  23h  2 BYTEs    ???
  5077.  25h 12 BYTEs    signature "LHarc's SFX "
  5078. ---LHA 2.x self-extracting archive---
  5079.  1Ch  8 BYTEs    ???
  5080.  24h 10 BYTEs    signature "LHa's SFX " (v2.10) or "LHA's SFX " (v2.13)
  5081. ---TopSpeed C 3.0 CRUNCH compressed file---
  5082.  1Ch    DWORD    018A0001h
  5083.  20h    WORD    1565h
  5084. ---PKARCK 3.5 self-extracting archive---
  5085.  1Ch    DWORD    00020001h
  5086.  20h    WORD    0700h
  5087. ---BSA (Soviet archiver) self-extracting archive---
  5088.  1Ch    WORD    000Fh
  5089.  1Eh    BYTE    A7h
  5090. ---LARC self-extracting archive---
  5091.  1Ch  4 BYTEs    ???
  5092.  20h 11 BYTEs    "SFX by LARC "
  5093. ---LH self-extracting archive---
  5094.  1Ch  8 BYTEs    ???
  5095.  24h  8 BYTEs    "LH's SFX "
  5096. ---other linkers---
  5097.  1Ch    var    optional information
  5098. ---
  5099.   N   N DWORDs    relocation items
  5100. Notes:    if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  5101.       versions of the MS linker set it that way
  5102.     if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  5103.       program is loaded as high in memory as possible
  5104.     the maximum allocation is set to FFFFh by default
  5105.  
  5106. Format of new executable header:
  5107. Offset    Size    Description
  5108.  00h  2 BYTEs    "NE" (4Eh 45h) signature
  5109.  02h  2 BYTEs    linker version (major, then minor)
  5110.  04h    WORD    offset from start of this header to entry table (see below)
  5111.  06h    WORD    length of entry table in bytes
  5112.  08h    DWORD    file load CRC (0 in Borland's TPW)
  5113.  0Ch    BYTE    program flags
  5114.         bits 0-1 DGROUP type
  5115.           0 = none
  5116.           1 = single shared
  5117.           2 = multiple (unshared)
  5118.           3 = (null)
  5119.         bit 2:    global initialization
  5120.         bit 3:    protected mode only
  5121.         bit 4:    8086 instructions
  5122.         bit 5:    80286 instructions
  5123.         bit 6:    80386 instructions
  5124.         bit 7:    80x87 instructions
  5125.  0Dh    BYTE    application flags
  5126.         bits 0-2: application type
  5127.             001 full screen (not aware of Windows/P.M. API)
  5128.             010 compatible with Windows/P.M. API
  5129.             011 uses Windows/P.M. API
  5130.         bit 3: is a Family Application (OS/2)
  5131.         bit 5: 0=executable, 1=errors in image
  5132.         bit 6: non-conforming program (valid stack is not maintained)
  5133.         bit 7: DLL or driver rather than application
  5134.             (SS:SP info invalid, CS:IP points at FAR init routine 
  5135.              called with AX=module handle which returns AX=0000h
  5136.              on failure, AX nonzero on successful initialization)
  5137.  0Eh    WORD    auto data segment index
  5138.  10h    WORD    initial local heap size
  5139.  12h    WORD    initial stack size (added to data seg, 0000h if SS != DS)
  5140.  14h    DWORD    program entry point (CS:IP), "CS" is index into segment table
  5141.  18h    DWORD    initial stack pointer (SS:SP), "SS" is segment index
  5142.         if SS=automatic data segment and SP=0000h, the stack pointer is
  5143.           set to the top of the automatic data segment, just below the
  5144.           local heap
  5145.  1Ch    WORD    segment count
  5146.  1Eh    WORD    module reference count
  5147.  20h    WORD    length of nonresident names table in bytes
  5148.  22h    WORD    offset from start of this header to segment table (see below)
  5149.  24h    WORD    offset from start of this header to resource table
  5150.  26h    WORD    offset from start of this header to resident names table
  5151.  28h    WORD    offset from start of this header to module reference table
  5152.  2Ah    WORD    offset from start of this header to imported names table
  5153.         (array of counted strings, terminated with a string of length
  5154.          00h)
  5155.  2Ch    DWORD    offset from start of file to nonresident names table
  5156.  30h    WORD    count of moveable entry point listed in entry table
  5157.  32h    WORD    file alignment size shift count
  5158.         0 is equivalent to 9 (default 512-byte pages)
  5159.  34h    WORD    number of resource table entries
  5160.  36h    BYTE    target operating system
  5161.         00h unknown
  5162.         01h OS/2
  5163.         02h Windows
  5164.         03h European MSDOS 4.x
  5165.         04h Windows 386
  5166.         05h BOSS (Borland Operating System Services)
  5167.  37h    BYTE    other EXE flags
  5168.         bit 0: supports long filenames
  5169.         bit 1: 2.X protected mode
  5170.         bit 2: 2.X proportional font
  5171.         bit 3: gangload area
  5172.  38h    WORD    offset to return thunks or start of gangload area
  5173.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  5174.  3Ch    WORD    minimum code swap area size
  5175.  3Eh  2 BYTEs    expected Windows version (minor version first)
  5176.  
  5177. Format of Codeview trailer (at end of executable):
  5178. Offset    Size    Description
  5179.  00h    WORD    signature 4E42h ('NB')
  5180.  02h    WORD    Microsoft debug info version number
  5181.  04h    DWORD    Codeview header offset
  5182.  
  5183. Format of new executable segment table record:
  5184.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  5185.  02h    WORD    length of image in file (0000h = 64K)
  5186.  04h    WORD    attributes
  5187.         bit 0: data segment rather than code segment
  5188.         bit 1: unused???
  5189.         bit 2: real mode
  5190.         bit 3: iterated
  5191.         bit 4: movable
  5192.         bit 5: sharable
  5193.         bit 6: preloaded rather than demand-loaded
  5194.         bit 7: execute-only (code) or read-only (data)
  5195.         bit 8: relocations (directly following code for this segment)
  5196.         bit 9: debug info present
  5197.         bits 10,11: 80286 DPL bits
  5198.         bit 12:        discardable
  5199.         bits 13-15: discard priority
  5200.  06h    WORD    number of bytes to allocate for segment (0000h = 64K)
  5201. Note:    the first segment table entry is entry number 1
  5202.  
  5203. Format of new executable entry table item (list):
  5204. Offset    Size    Description
  5205.  00h    BYTE    number of entry points (00h if end of entry table list)
  5206.  01h    BYTE    segment number (00h if end of entry table list)
  5207.  02h 3N BYTEs    entry records
  5208.         Offset    Size    Description
  5209.          00h    BYTE    flags
  5210.                 bit 0: exported
  5211.                 bit 1: single data
  5212.                 bits 2-7: unused???
  5213.          01h    WORD    offset within segment
  5214.  
  5215. Format of new executable relocation data (immediately follows segment image):
  5216. Offset    Size    Description
  5217.  00h    WORD    number of relocation items
  5218.  02h 8N BYTEs    relocation items
  5219.         Offset    Size    Description
  5220.          00h    BYTE    relocation type
  5221.                 00h LOBYTE
  5222.                 02h BASE
  5223.                 03h PTR
  5224.                 05h OFFS
  5225.                 0Bh PTR48
  5226.                 0Dh OFFS32
  5227.          01h    BYTE    flags
  5228.                 bit 2: additive
  5229.          02h    WORD    offset within segment
  5230.          04h    WORD    target address segment
  5231.          06h    WORD    target address offset
  5232.          
  5233. Format of new executable resource data:
  5234. Offset    Size    Description
  5235.  00h    WORD    alignment shift count for resource data
  5236.  02h  N RECORDs resources
  5237.     Format of resource record:
  5238.     Offset    Size    Description
  5239.      00h    WORD    type ID
  5240.             0000h if end of resource records
  5241.             >= 8000h if integer type
  5242.             else offset from start of resource table to type string
  5243.      02h    WORD    number of resources of this type
  5244.      04h    DWORD    reserved for runtime use
  5245.      08h  N Resources (see below)
  5246. Note:    resource type and name strings are stored immediately following the
  5247.       resource table, and are not null-terminated
  5248.  
  5249. Format of new executable resource entry:
  5250. Offset    Size    Description
  5251.  00h    WORD    offset in alignment units from start of file to contents of
  5252.         the resource data
  5253.  02h    WORD    length of resource image in bytes
  5254.  04h    WORD    flags
  5255.         bit 4: moveable
  5256.         bit 5: shareable
  5257.         bit 6: preloaded
  5258.  06h    WORD    resource ID
  5259.         >= 8000h if integer resource
  5260.         else offset from start of resource table to resource string
  5261.  08h    DWORD    reserved for runtime use
  5262. Notes:    resource type and name strings are stored immediately following the
  5263.       resource table, and are not null-terminated
  5264.     strings are counted strings, with a string of length 0 indicating the
  5265.       end of the resource table
  5266.  
  5267. Format of new executable module reference table [one bundle of entries]:
  5268. Offset    Size    Description
  5269.  00h    BYTE    number of records in this bundle (00h if end of table)
  5270.  01h    BYTE    segment indicator
  5271.         00h unused
  5272.         FFh movable segment, segment number is in entry
  5273.         else segment number of fixed segment
  5274.  02h  N RECORDs
  5275.     Format of segment record
  5276.     Offset    Size    Description
  5277.      00h    BYTE    flags
  5278.             bit 0: entry is exported
  5279.             bit 1: entry uses global (shared) data
  5280.             bits 7-3: number of parameter words
  5281.     ---fixed segment---
  5282.      01h    WORD    offset
  5283.     ---moveable segment---
  5284.      01h  2 BYTEs    INT 3F instruction (CDh 3Fh)
  5285.      03h    BYTE    segment number
  5286.      05h    WORD    offset
  5287. Note:    table entries are numbered starting from 1
  5288.  
  5289. Format of new executable resident/nonresident name table entry:
  5290. Offset    Size    Description
  5291.  00h    BYTE    length of string (00h if end of table)
  5292.  01h  N BYTEs    ASCII text of string
  5293.  N+1    WORD    ordinal number (index into entry table)
  5294. Notes:    the first string in the resident name table is the module name; the
  5295.       first entry in the nonresident name table is the module description
  5296.     the strings are case-sensitive; if the executable was linked with
  5297.       /IGNORECASE, all strings are in uppercase
  5298.  
  5299. Format of Linear Executable (enhanced mode executable) header:
  5300. Offset    Size    Description
  5301.  00h  2 BYTEs    "LE" (4Ch 45h) signature
  5302.  02h    BYTE    byte order (00h = little-endian, nonzero = big-endian)
  5303.  03h    BYTE    word order (00h = little-endian, nonzero = big-endian)
  5304.  04h    DWORD    executable format level
  5305.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  5306.         01h Intel 80286 or upwardly compatible
  5307.         02h Intel 80386 or upwardly compatible            
  5308.         03h Intel 80486 or upwardly compatible            
  5309.         04h Intel 80586 or upwardly compatible
  5310.         20h Intel i860 (N10) or compatible
  5311.         21h Intel "N11" or compatible
  5312.         40h MIPS Mark I (R2000, R3000) or compatible
  5313.         41h MIPS Mark II (R6000) or compatible
  5314.         42h MIPS Mark III (R4000) or compatible
  5315.  0Ah    WORD    target operating system
  5316.         01h OS/2
  5317.         02h Windows
  5318.         03h European DOS 4.0
  5319.         04h Windows 386
  5320.  0Ch    DWORD    module version
  5321.  10h    DWORD    module type
  5322.         bit 2: initialization (only for DLLs)
  5323.             0 = global
  5324.             1 = per-process
  5325.         bit 4: no internal fixups in executable image
  5326.         bit 5: no external fixups in executable image
  5327.         bits 8,9,10:
  5328.             0 = unknown
  5329.             1 = incompatible with PM windowing \
  5330.             2 = compatible with PM windowing    > (only for
  5331.             3 = uses PM windowing API       /    programs)
  5332.         bit 13: module not loadable (only for programs)
  5333.         bit 15: module is DLL rather than program
  5334.  14h    DWORD    number of memory pages
  5335.  18h    Initial CS:EIP
  5336.     DWORD    object number
  5337.     DWORD    offset
  5338.  20h    Initial SS:ESP
  5339.     DWORD    object number
  5340.     DWORD    offset
  5341.  28h    DWORD    memory page size
  5342.  2Ch    DWORD    bytes on last page
  5343.  30h    DWORD    fixup section size
  5344.  34h    DWORD    fixup section checksum
  5345.  38h    DWORD    loader section size
  5346.  3Ch    DWORD    loader section checksum
  5347.  40h    DWORD    offset of object table (see below)
  5348.  44h    DWORD    object table entries
  5349.  48h    DWORD    object page map table offset
  5350.  4CH    DWORD    object iterate data map offset
  5351.  50h    DWORD    resource table offset
  5352.  54h    DWORD    resource table entries
  5353.  58h    DWORD    resident names table offset
  5354.  5Ch    DWORD    entry table offset
  5355.  60h    DWORD    module directives table offset
  5356.  64h    DWORD    Module Directives entries
  5357.  68h    DWORD    Fixup page table offset
  5358.  6Ch    DWORD    Fixup record table offset
  5359.  70h    DWORD    imported modules name table offset
  5360.  74h    DWORD    imported modules count
  5361.  78h    DWORD    imported procedures name table offset
  5362.  7Ch    DWORD    per-page checksum table offset
  5363.  80h    DWORD    data pages offset
  5364.  84h    DWORD    preload page count
  5365.  88h    DWORD    non-resident names table offset
  5366.  8Ch    DWORD    non-resident names table length
  5367.  90h    DWORD    non-resident names checksum
  5368.  94h    DWORD    automatic data object
  5369.  98h    DWORD    debug information offset
  5370.  9Ch    DWORD    debug information length
  5371.  A0h    DWORD    preload instance pages number
  5372.  A4h    DWORD    demand instance pages number
  5373.  A8h    DWORD    extra heap allocation
  5374.  ACh 20 BYTEs    reserved
  5375.  C0h    WORD    device ID (MS-Windows VxD only)
  5376.  C2h    WORD    DDK version (MS-Windows VxD only)
  5377. Note:    used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  5378.  
  5379. Format of object table entry:
  5380. Offset    Size    Description
  5381.  00h    DWORD    virtual size in bytes
  5382.  04h    DWORD    relocation base address
  5383.  08h    DWORD    object flags
  5384.         bit 0: readable
  5385.         bit 1: writable
  5386.         bit 2: executable
  5387.         bit 3: resource
  5388.         bit 4: discardable
  5389.         bit 5: shared
  5390.         bit 6: preloaded
  5391.         bit 7: invalid
  5392.         bit 8-9: type
  5393.             00 normal
  5394.             01 zero-filled
  5395.             10 resident
  5396.             11 resident/contiguous
  5397.         bit 10: "RESIDENT/LONG_LOCKABLE"
  5398.         bit 11: reserved
  5399.         bit 12: "16:16_ALIAS"
  5400.         bit 13: "BIG" (Huge: 32-bit)
  5401.         bit 14: conforming
  5402.         bit 15: "OBJECT_I/O_PRIVILEGE_LEVEL"
  5403.         bits 16-31: reserved
  5404.  0Ch    DWORD    page map index
  5405.  10h    DWORD    page map entries
  5406.  14h  4 BYTEs    reserved??? (apparently always zeros)
  5407.  
  5408. Format of object page map table entry:
  5409. Offset    Size    Description
  5410.  00h    BYTE    ??? (usually 00h)
  5411.  01h    WORD    index to fixup table (big-endian)
  5412.         0000h if no relocation info
  5413.  03h    BYTE    type (00h hard copy in file, 03h some relocation needed)
  5414.  
  5415. Format of resident names table entry:
  5416. Offset    Size    Description
  5417.  00h    BYTE    length of name
  5418.  01h  N BYTEs    name
  5419.  N+1  3 BYTEs    ???
  5420.  
  5421. Format of linear executable entry table:
  5422. Offset    Size    Description
  5423.  00h    BYTE    number of entries in table
  5424.  01h 10 BYTEs per entry
  5425.         Offset    Size    Description
  5426.          00h    BYTE    bit flags
  5427.                 bit 0: non-empty bundle
  5428.                 bit 1: 32-bit entry
  5429.          01h    WORD    object number
  5430.          03h    BYTE    entry type flags
  5431.                 bit 0: exported
  5432.                 bit 1: uses single data rather than instance
  5433.                 bit 2: reserved
  5434.                 bits 3-7: number of stack parameters
  5435.          04h    DWORD    offset of entry point
  5436.          08h  2 BYTEs    ???
  5437. Note:    empty bundles (bit flags at 00h = 00h) are used to skip unused indices,
  5438.       and do not contain the remaining nine bytes
  5439.  
  5440. Format of linear executable fixup record:
  5441. Offset    Size    Description
  5442.  00h    BYTE    type
  5443.         bits 7-4: modifier (0001 single, 0011 multiple)
  5444.         bits 3-0: type
  5445.             0000 byte offset
  5446.             0010 word segment
  5447.             0011 16-bit far pointer (DWORD)
  5448.             0101 16-bit offset
  5449.             0110 32-bit far pointer (PWORD)
  5450.             0111 32-bit offset
  5451.             1000 near call or jump, WORD/DWORD based on seg attrib
  5452.  01h    BYTE    fixup type
  5453.         bit 7:    ordinal is BYTE rather than WORD
  5454.         bit 5:    addition with DWORD rather than WORD
  5455.         bit 4:    reloation info has size with new two bytes at end
  5456.         bit 2:    set of add to destination, clear to replace destination
  5457.         bits 1-0: type
  5458.             00 internal fixup
  5459.             01 external fixup, imported by ordinal
  5460.             10 external fixup, imported by name
  5461. ---if single type---
  5462.  02h    WORD    offset within page
  5463.  04h    relocation information
  5464.     ---internal fixup---
  5465.     BYTE    object number
  5466.     ---external,ordinal---
  5467.     BYTE    one-based module number in Import Module table
  5468.     BYTE/WORD ordinal number
  5469.     WORD/DWORD value to add (only present if modifier bit 4 set)
  5470.     ---external,name---
  5471.     BYTE    one-based module number in Import Module table
  5472.     WORD    offset in Import Procedure names
  5473.     WORD/DWORD value to add (only present if modifier bit 4 set)
  5474. ---if multiple type---
  5475.  02h    BYTE    number of items
  5476.  03h    var    relocation info as for "single" type (see above)
  5477.       N WORDs    offsets of items to relocate
  5478.  
  5479. Format of Borland debugging information header (following load image):
  5480. Offset    Size    Description
  5481.  00h    WORD    signature 52FBh
  5482.  02h    WORD    version ID
  5483.  04h    DWORD    size of name pool in bytes
  5484.  08h    WORD    number of names in namem pool
  5485.  0Ah    WORD    number of type entries
  5486.  0Ch    WORD    number of structure members
  5487.  0Eh    WORD    number of symbols
  5488.  10h    WORD    number of global symbols
  5489.  12h    WORD    number of modules
  5490.  14h    WORD    number of locals (optional)
  5491.  16h    WORD    number of scopes in table
  5492.  18h    WORD    number of line-number entries
  5493.  1Ah    WORD    number of include files
  5494.  1Ch    WORD    number of segment records
  5495.  1Eh    WORD    number of segment/file correlations
  5496.  20h    DWORD    size of load image after removing uninitialized data and debug
  5497.         info
  5498.  24h    DWORD    debugger hook; pointer into debugged program whose meaning
  5499.         depends on program flags
  5500.  28h    BYTE    program flags
  5501.         bit 0: case-sensitive link
  5502.         bit 1: pascal overlay program
  5503.  29h    WORD    no longer used
  5504.  2Bh    WORD    size of data pool in bytes
  5505.  2Dh    BYTE    padding
  5506.  2Eh    WORD    size of following header extension (currently 00h, 10h, or 20h)
  5507.  30h    WORD    number of classes
  5508.  32h    WORD    number of parents
  5509.  34h    WORD    number of global classes (currently unused)
  5510.  36h    WORD    number of overloads (currently unused)
  5511.  38h    WORD    number of scope classes
  5512.  3Ah    WORD    number of module classes
  5513.  3Ch    WORD    number of coverage offsets
  5514.  3Eh    DWORD    offset relative to symbol base of name pool
  5515.  42h    WORD    number of browser information records
  5516.  44h    WORD    number of optimized symbol records
  5517.  46h    WORD    debugging flags
  5518.  48h  8 BYTEs    padding
  5519. Note:    additional information on the Borland debugging info may be found in
  5520.       Borland's Open Architecture Handbook
  5521. ----------214B-------------------------------
  5522. INT 21 - ELRES v1.0 only - INSTALLATION CHECK
  5523.     AH = 4Bh
  5524.     DS:DX = 0000h:0000h
  5525. Return: ES:BX -> ELRES history structure (see AH=2Bh/CX=454Ch)
  5526.     DX = DABEh (signature, DAve BEnnett)
  5527. Note:    ELRES is an MSDOS return code (errorlevel) recorder by David H. Bennett
  5528. SeeAlso: AH=2Bh/CX=454Ch
  5529. ----------214B04-----------------------------
  5530. INT 21 - VIRUS - "MG", "699"/"Thirteen Minutes" - INSTALLATION CHECK
  5531.     AX = 4B04h
  5532. Return: CF clear if "MG" resident
  5533.     AX = 044Bh if "699"/"Thirteen Minutes" resident
  5534. SeeAlso: AX=4243h,AX=4B25h
  5535. ----------214B05-----------------------------
  5536. INT 21 - DOS 5.0 - SET EXECUTION STATE
  5537.     AX = 4B05h
  5538.     DS:DX -> execution state structure (see below)
  5539. Return: CF clear if successful
  5540.         AX = 0000h
  5541.     CF set on error
  5542.         AX = error code (see AH=59h)
  5543. Note:    used by programs which intercept AX=4B00h to prepare new programs for
  5544.       execution (including setting the DOS version number).     No DOS, BIOS
  5545.       or other software interrupt may be called after return from this call
  5546.       before commencement of the child process.  If DOS is running in the
  5547.       HMA, A20 is turned off on return from this call.
  5548. SeeAlso: AH=4Bh
  5549.  
  5550. Format of execution state structure:
  5551. Offset    Size    Description
  5552.  00h    WORD    reserved (00h)
  5553.  02h    WORD    type flags
  5554.         bit 0: program is an .EXE
  5555.             1: program is an overlay
  5556.  04h    DWORD    pointer to ASCIZ name of program file
  5557.  08h    WORD    PSP segment of new program
  5558.  0Ah    DWORD    starting CS:IP of new program
  5559.  0Eh    DWORD    program size including PSP
  5560. ----------214B25-----------------------------
  5561. INT 21 - VIRUS - "1063"/"Mono" - INSTALLATION CHECK
  5562.     AX = 4B25h
  5563. Return: DI = 1234h if resident
  5564. SeeAlso: AX=4B04h,AX=4B40h
  5565. ----------214B40-----------------------------
  5566. INT 21 - VIRUS - "Plastique"/"AntiCad" - INSTALLATION CHECK
  5567.     AX = 4B40h
  5568. Return: AX = 5678h if resident
  5569. SeeAlso: AX=4B25h,AX=4B41h,AX=4B4Ah
  5570. ----------214B41-----------------------------
  5571. INT 21 - VIRUS - "Plastique"/"AntiCad" - ???
  5572.     AX = 4B41h
  5573.     ???
  5574. Return: ???
  5575. SeeAlso: AX=4B40h
  5576. ----------214B4A-----------------------------
  5577. INT 21 - VIRUS - "Jabberwocky" - INSTALLATION CHECK
  5578.     AX = 4B4Ah
  5579. Return: AL = 57h if resident
  5580. SeeAlso: AX=4B40h,AX=4B4Bh
  5581. ----------214B4B-----------------------------
  5582. INT 21 - VIRUS - "Horse-2" - INSTALLATION CHECK
  5583.     AX = 4B4Bh
  5584. Return: CF clear if resident
  5585. SeeAlso: AX=4B4Ah,AX=4B4Dh
  5586. ----------214B4D-----------------------------
  5587. INT 21 - VIRUS - "Murphy-2", "Patricia"/"Smack" - INSTALLATION CHECK
  5588.     AX = 4B4Dh
  5589. Return: CF clear if resident
  5590. SeeAlso: AX=4B4Ah,AX=4B50h
  5591. ----------214B50-----------------------------
  5592. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - INSTALLATION CHECK
  5593.     AX = 4B50h
  5594. Return: AX = 1234h if resident
  5595. SeeAlso: AX=4B4Dh,AX=4B53h,AX=4B60h
  5596. ----------214B53-----------------------------
  5597. INT 21 - VIRUS - "Horse" - INSTALLATION CHECK
  5598.     AX = 4B53h
  5599. Return: CF clear if resident
  5600. SeeAlso: AX=4B50h,AX=4B55h
  5601. ----------214B55-----------------------------
  5602. INT 21 - VIRUS - "Sparse" - INSTALLATION CHECK
  5603.     AX = 4B55h
  5604. Return: AX = 1231h if resident
  5605. SeeAlso: AX=4B53h,AX=4B59h
  5606. ----------214B59-----------------------------
  5607. INT 21 - VIRUS - "Murphy-1", "Murphy-4" - INSTALLATION CHECK
  5608.     AX = 4B59h
  5609. Return: CF clear if resident
  5610. SeeAlso: AX=4B50h,AX=4B5Eh
  5611. ----------214B5E-----------------------------
  5612. INT 21 - VIRUS - "Brothers" - INSTALLATION CHECK
  5613.     AX = 4B5Eh
  5614. Return: CF clear if resident
  5615. SeeAlso: AX=4B59h,AX=4B87h
  5616. ----------214B60-----------------------------
  5617. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - ???
  5618.     AX = 4B60h
  5619.     ???
  5620. Return: ???
  5621. SeeAlso: AX=4B50h
  5622. ----------214B87-----------------------------
  5623. INT 21 - VIRUS - "Shirley" - INSTALLATION CHECK
  5624.     AX = 4B87h
  5625. Return: AX = 6663h if resident
  5626. SeeAlso: AX=4B5Eh,AX=4B95h
  5627. ----------214B95-----------------------------
  5628. INT 21 - VIRUS - "Zherkov-1882" - INSTALLATION CHECK
  5629.     AX = 4B95h
  5630. Return: AX = 1973h if resident
  5631. SeeAlso: AX=4B87h,AX=4BA7h
  5632. ----------214BA7-----------------------------
  5633. INT 21 - VIRUS - "1876"/"Dash-em" - INSTALLATION CHECK
  5634.     AX = 4BA7h
  5635. Return: AX = B459h if resident
  5636. SeeAlso: AX=4B95h,AX=4BAAh
  5637. ----------214BAA-----------------------------
  5638. INT 21 - VIRUS - "Nomenklatura" - INSTALLATION CHECK
  5639.     AX = 4BAAh
  5640. Return: CF clear if resident
  5641. SeeAlso: AX=4BA7h,AX=4BAFh
  5642. ----------214BAF-----------------------------
  5643. INT 21 - VIRUS - "948"/"Screenplus1", "Magnitogorsk" - INSTALLATION CHECK
  5644.     AX = 4BAFh
  5645. Return: AL = AFh if "Magnitogorsk" resident
  5646.     AL = FAh if "948"/"Screenplus1" resident
  5647. SeeAlso: AX=4BAAh,AX=4BDDh
  5648. ----------214BDD-----------------------------
  5649. INT 21 - VIRUS - "Lozinsky"/"Zherkov" - INSTALLATION CHECK
  5650.     AX = 4BDDh
  5651. Return: AX = 1234h
  5652. SeeAlso: AX=4BAFh,AX=4BFEh
  5653. ----------214BEE-----------------------------
  5654. INT 21 - F-DRIVER.SYS v1.14+ - GRAB INT 21
  5655.     AX = 4BEEh
  5656. Return: AX = 1234h if grab successful
  5657.        = 2345h if failed (INT 21 grabbed previously)
  5658. Notes:    F-DRIVER.SYS is part of the F-PROT virus/trojan protection package by
  5659.       Fridrik Skulason
  5660.     when called the first time, this function moves the INT 21 monitoring
  5661.       code from its original location in the INT 21 chain to be the first
  5662.       thing called by INT 21.  This is the mechanism used by F-NET.
  5663. SeeAlso: INT 2F/AX=4653h
  5664. ----------214BF0-----------------------------
  5665. INT 21 - DIET v1.10+ (Overlay Mode) - INSTALLATION CHECK
  5666.     AX = 4BF0h
  5667. Return: CF clear if installed
  5668.         AX = 899Dh
  5669. Note:    DIET is an executable-compression program
  5670. SeeAlso: AX=4BF1h
  5671. ----------214BF1-----------------------------
  5672. INT 21 - DIET v1.10+ (Overlay Mode) - EXPAND PROGRAM???
  5673.     AX = 4BF1h
  5674. Return: ???
  5675. SeeAlso: AX=4BF0h
  5676. ----------214BFE-----------------------------
  5677. INT 21 - VIRUS - "Hitchcock", "Dark Avenger-1028", "1193" - INSTALLATION CHECK
  5678.     AX = 4BFEh
  5679. Return: AX = 1234h if "Hitchcock" resident
  5680.     AX = ABCDh if "1193"/"Copyright" resident
  5681.     DI = 55BBh if "Dark Avenger-1028" resident
  5682. SeeAlso: AX=4BDDh,AX=4BFFh"Justice"
  5683. ----------214BFF-----------------------------
  5684. INT 21 - VIRUS - "USSR-707", "Justice", "Europe 92" - INSTALLATION CHECK
  5685.     AX = 4BFFh
  5686. Return: BL = FFh if "USSR-707" resident
  5687.     DI = 55AAh if "Justice" resident
  5688.     CF clear if "Europe 92" resident
  5689. SeeAlso: AX=4BFEh,AX=4BFFh"Cascade",AX=5252h
  5690. ----------214BFFSI0000-----------------------
  5691. INT 21 - VIRUS - "Cascade" - INSTALLATION CHECK
  5692.     AX = 4BFFh
  5693.     SI = 0000h
  5694.     DI = 0000h
  5695. Return: DI = 55AAh if installed
  5696. SeeAlso: AX=4BFFh"Justice",AX=5252h
  5697. ----------214C-------------------------------
  5698. INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
  5699.     AH = 4Ch
  5700.     AL = return code
  5701. Return: never returns
  5702. Notes:    unless the process is its own parent (see AH=26h, offset 16h in PSP),
  5703.       all open files are closed and all memory belonging to the process
  5704.       is freed
  5705.     all network file locks should be removed before calling this function
  5706. SeeAlso: AH=00h,AH=26h,AH=4Bh,AH=4Dh,INT 15/AH=12h/BH=02h,INT 20,INT 22
  5707. SeeAlso: INT 60/DI=0601h
  5708. ----------214D-------------------------------
  5709. INT 21 - DOS 2+ - GET RETURN CODE
  5710.     AH = 4Dh
  5711. Return: AH = termination type
  5712.         00h normal (INT 20,INT 21/AH=00h, or INT 21/AH=4Ch)
  5713.         01h control-C abort
  5714.         02h critical error abort
  5715.         03h terminate and stay resident (INT 21/AH=31h or INT 27)
  5716.     AL = return code
  5717. Notes:    the word in which DOS stores the return code is cleared after being
  5718.       read by this function, so the return code can only be retrieved once
  5719.     this call should not be used if the child was started with AX=4B04h;
  5720.       use AH=8Ah instead
  5721.     the following sequence will close a Virtual DOS Machine under OS/2 2.0:
  5722.       MOV    AH,4Dh
  5723.       INT    21h
  5724.       HLT
  5725.       DB    02h,0FDh
  5726.       This sequence is the only way to close a specific VDM which was
  5727.       booted from floppy or a disk image.
  5728. SeeAlso: AH=4Bh,AH=4Ch,AH=8Ah
  5729. ----------214E-------------------------------
  5730. INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
  5731.     AH = 4Eh
  5732.     AL = special flag for use by APPEND (see note below)
  5733.     CX = file attribute mask (see AX=4301h) (bits 0 and 5 ignored)
  5734.     DS:DX -> ASCIZ file specification (may include path and wildcards)
  5735. Return: CF clear if successful
  5736.         [DTA] = FindFirst data block (see below)
  5737.     CF set on error
  5738.         AX = error code (02h,03h,12h) (see AH=59h)
  5739. Notes:    for search attributes other than 08h, all files with at MOST the
  5740.       specified combination of hidden, system, and directory attributes
  5741.       will be returned.  Under DOS 2.x, searching for attribute 08h
  5742.       (volume label) will also return normal files, while under DOS 3+
  5743.       only the volume label (if any) will be returned.
  5744.     this call also returns successfully if given the name of a character
  5745.       device without wildcards.  DOS 2.x returns attribute 00h, size 0,
  5746.       and the current date and time.  DOS 3+ returns attribute 40h and the
  5747.       current date and time.
  5748.     immediately after an INT 2F/AX=B711h (APPEND return found name), the
  5749.       name at DS:DX will be overwritten; if AL=00h on entry, the actual
  5750.       found pathname will be stored, otherwise, the actual found path
  5751.       will be prepended to the original filespec without a path.
  5752.     under LANtastic, this call may be used to obtain a list of a server's
  5753.       shared resources by searching for "\\SERVER\*.*"; a list of printer
  5754.       resources may be obtained by searching for "\\SERVER\@*.*"
  5755.     under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
  5756. BUG:    under DOS 3.x and 4.x, the second and subsequent calls to this function
  5757.       with a character device name (no wildcards) and search attributes
  5758.       which include the volume-label bit (08h) will fail unless there is
  5759.       an intervening DOS call which implicitly or explicity performs a
  5760.       directory search without the volume-label bit.  Such implicit
  5761.       searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
  5762.       (AH=41h), and RENAME (AH=56h)
  5763. SeeAlso: AH=11h,AH=4Fh,AX=4301h,INT 2F/AX=111Bh,INT 2F/AX=B711h
  5764.  
  5765. Format of FindFirst data block:
  5766. Offset    Size    Description
  5767. ---PCDOS 3.10, PCDOS 4.01, MSDOS 3.2/3.3/5.0---
  5768.  00h    BYTE    drive letter (bits 0-6), remote if bit 7 set
  5769.  01h 11 BYTEs    search template
  5770.  0Ch    BYTE    search attributes
  5771. ---DOS 2.x (and some DOS 3.x???)---
  5772.  00h    BYTE    search attributes
  5773.  01h    BYTE    drive letter
  5774.  02h 11 BYTEs    search template
  5775. ---WILDUNIX.COM---
  5776.  00h 12 BYTEs    15-character wildcard search pattern and drive letter (packed)
  5777.  0Ch    BYTE    search attributes
  5778. ---DOS 2.x and most 3.x---
  5779.  0Dh    WORD    entry count within directory
  5780.  0Fh    DWORD    pointer to DTA???
  5781.  13h    WORD    cluster number of start of parent directory
  5782. ---PCDOS 4.01, MSDOS 3.2/3.3/5.0---
  5783.  0Dh    WORD    entry count within directory
  5784.  0Fh    WORD    cluster number of start of parent directory
  5785.  11h  4 BYTEs    reserved
  5786. ---all versions, documented fields---
  5787.  15h    BYTE    attribute of file found
  5788.  16h    WORD    file time
  5789.             bits 11-15: hour
  5790.             bits 5-10:    minute
  5791.             bits 0-4:    seconds/2
  5792.  18h    WORD    file date
  5793.             bits 9-15:    year-1980
  5794.             bits 5-8:    month
  5795.             bits 0-4:    day
  5796.  1Ah    DWORD    file size
  5797.  1Eh 13 BYTEs    ASCIZ filename+extension
  5798. ----------214E-------------------------------
  5799. INT 21 - WILDUNIX.COM internal - INSTALLATION CHECK
  5800.     AH = 4Eh
  5801.     DS:DX = 0000h:0000h
  5802. Return:    AH = 99h if installed
  5803. Note:    WILDUNIX.COM is a resident Unix-style wildcard expander by Steve
  5804.       Hosgood and Terry Barnaby
  5805. ----------214F-------------------------------
  5806. INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
  5807.     AH = 4Fh
  5808.     [DTA] = data block from previous FindFirst or FindNext call
  5809. Return: CF clear if successful
  5810.     CF set on error
  5811.         AX = error code (12h) (see AH=59h)
  5812. SeeAlso: AH=12h,AH=4Eh
  5813. ----------2150-------------------------------
  5814. INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
  5815.     AH = 50h
  5816.     BX = segment of PSP for new process
  5817. Notes:    DOS uses the current PSP address to determine which processes own files
  5818.       and memory; it corresponds to process identifiers used by other OSs
  5819.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  5820.       handler without setting the Critical Error flag
  5821.     under DOS 3+, this function does not use any of the DOS-internal stacks
  5822.       and may thus be called at any time, even during another INT 21h call
  5823.     some Microsoft applications use segments of 0000h and FFFFh; although
  5824.       one should only call this function with valid PSP addresses, any
  5825.       program hooking it should be prepared to handle invalid addresses
  5826.     supported by OS/2 compatibility box
  5827.     this call was undocumented prior to the release of DOS 5.0
  5828. SeeAlso: AH=26h,AH=51h,AH=62h
  5829. ----------2151-------------------------------
  5830. INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
  5831.     AH = 51h
  5832. Return: BX = segment of PSP for current process
  5833. Notes:    DOS uses the current PSP address to determine which processes own files
  5834.       and memory; it corresponds to process identifiers used by other OSs
  5835.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  5836.       handler without setting the Critical Error flag
  5837.     under DOS 3+, this function does not use any of the DOS-internal stacks
  5838.       and may thus be called at any time, even during another INT 21h call
  5839.     supported by OS/2 compatibility box
  5840.     identical to the documented AH=62h
  5841.     undocumented for DOS 2.x-4.x, but newly documented for 5.0.
  5842. SeeAlso: AH=26h,AH=50h,AH=62h
  5843. ----------2152-------------------------------
  5844. INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
  5845.     AH = 52h
  5846. Return: ES:BX -> DOS list of lists
  5847. Note:    partially supported by OS/2 v1.1 compatibility box (however, most
  5848.       pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
  5849.       pointer is FFFFh:FFFFh).
  5850.  
  5851. Format of List of Lists:
  5852. Offset    Size    Description
  5853.  -12    WORD    (DOS 3.1+) sharing retry count (see AX=440Bh)
  5854.  -10    WORD    (DOS 3.1+) sharing retry delay (see AX=440Bh)
  5855.  -8    DWORD    (DOS 3+) pointer to current disk buffer
  5856.  -4    WORD    (DOS 3+) pointer in DOS code segment of unread CON input
  5857.         when CON is read via a handle, DOS reads an entire line,
  5858.           and returns the requested portion, buffering the rest
  5859.           for the next read.  0000h indicates no unread input
  5860.  -2    WORD    segment of first memory control block
  5861.  00h    DWORD    pointer to first Drive Parameter Block (see AH=32h)
  5862.  04h    DWORD    pointer to first System File Table (see below)
  5863.  08h    DWORD    pointer to active CLOCK$ device's header
  5864.  0Ch    DWORD    pointer to active CON device's header
  5865. ---DOS 2.x---
  5866.  10h    BYTE    number of logical drives in system
  5867.  11h    WORD    maximum bytes/block of any block device
  5868.  13h    DWORD    pointer to first disk buffer (see below)
  5869.  17h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5870.         NUL is always the first device on DOS's linked list of device 
  5871.         drivers. (see below)
  5872. ---DOS 3.0---
  5873.  10h    BYTE    number of block devices
  5874.  11h    WORD    maximum bytes/block of any block device
  5875.  13h    DWORD    pointer to first disk buffer (see below)
  5876.  17h    DWORD    pointer to array of current directory structures (see below)
  5877.  1Bh    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  5878.  1Ch    DWORD    pointer to STRING= workspace area
  5879.  20h    WORD    size of STRING area (the x in STRING=x from CONFIG.SYS)
  5880.  22h    DWORD    pointer to FCB table
  5881.  26h    WORD    the y in FCBS=x,y from CONFIG.SYS
  5882.  28h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5883.         NUL is always the first device on DOS's linked list of device 
  5884.         drivers. (see below)
  5885. ---DOS 3.1-3.3---
  5886.  10h    WORD    maximum bytes per sector of any block device
  5887.  12h    DWORD    pointer to first disk buffer in buffer chain (see below)
  5888.  16h    DWORD    pointer to array of current directory structures (see below)
  5889.  1Ah    DWORD    pointer to system FCB tables (see below)
  5890.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  5891.  20h    BYTE    number of block devices installed
  5892.  21h    BYTE    number of available drive letters (largest of 5, installed
  5893.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  5894.         current directory structure array.
  5895.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5896.         NUL is always the first device on DOS's linked list of device
  5897.         drivers. (see below)
  5898.  34h    BYTE    number of JOIN'ed drives
  5899. ---DOS 4.x---
  5900.  10h    WORD    maximum bytes per sector of any block device
  5901.  12h    DWORD    pointer to disk buffer info record (see below)
  5902.  16h    DWORD    pointer to array of current directory structures (see below)
  5903.  1Ah    DWORD    pointer to system FCB tables (see below)
  5904.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  5905.         (always 00h for DOS 5.0)
  5906.  20h    BYTE    number of block devices installed
  5907.  21h    BYTE    number of available drive letters (largest of 5, installed
  5908.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  5909.         current directory structure array.
  5910.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  5911.         NUL is always the first device on DOS's linked list of device
  5912.         drivers. (see below)
  5913.  34h    BYTE    number of JOIN'ed drives???
  5914.  35h    WORD    pointer within IBMDOS code segment to list of special program
  5915.         names (see below)
  5916.         (always 0000h for DOS 5.0)
  5917.  37h    DWORD    pointer to FAR routine for resident IFS utility functions
  5918.         (see below)
  5919.         may be called by any IFS driver which does not wish to
  5920.         service functions 20h or 24h-28h itself
  5921.  3Bh    DWORD    pointer to chain of IFS (installable file system) drivers
  5922.  3Fh    WORD    the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
  5923.  41h    WORD    the y in BUFFERS x,y
  5924.  43h    BYTE    boot drive (1=A:)
  5925.  44h    BYTE    01h if 80386+, 00h otherwise???
  5926.  45h    WORD    extended memory size in K
  5927. ---DOS 5.0---
  5928.  10h 39 BYTEs    as for DOS 4.x (see above)
  5929.  37h    DWORD    pointer to SETVER program list or 0000h:0000h
  5930.  3Bh    WORD    ??? pointer to function in DOS CS
  5931.  3Dh    WORD    ??? apparently 0000h if DOS loaded low, PSP of most-recently
  5932.         EXECed program if DOS in HMA
  5933.  3Fh  8 BYTEs    as for DOS 4.x (see above)
  5934.  
  5935. Format of memory control block (see also below):
  5936. Offset    Size    Description
  5937.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  5938.  01h    WORD    PSP segment of owner or
  5939.         0000h if free
  5940.         0006h if DR-DOS XMS UMB
  5941.         0007h if DR-DOS excluded upper memory ("hole")
  5942.         0008h if belongs to DOS
  5943.         FFFAh if 386MAX UMB control block
  5944.         FFFDh if 386MAX locked-out memory
  5945.         FFFEh if 386MAX UMB (immediately follows its control block)
  5946.  03h    WORD    size of memory block in paragraphs
  5947.  05h  3 BYTEs    unused
  5948. ---DOS 2.x,3.x---
  5949.  08h  8 BYTEs    unused
  5950. ---DOS 4+ ---
  5951.  08h  8 BYTEs    ASCII program name if PSP memory block or DR-DOS UMB,
  5952.           else garbage
  5953.         null-terminated if less than 8 characters
  5954. Notes:    the next MCB is at segment (current + size + 1)
  5955.     under DOS 3.1+, the first memory block is the DOS data segment,
  5956.       containing installable drivers, buffers, etc.     Under DOS 4+ it is
  5957.       divided into subsegments, each with its own memory control block
  5958.       (see below), the first of which is at offset 0000h.
  5959.     for DOS 5.0, blocks owned by DOS may have either "SC" or "SD" in bytes
  5960.       08h and 09h.    "SC" is system code or locked-out inter-UMB memory,
  5961.       "SD" is system data, device drivers, etc.
  5962.     Some versions of DR-DOS use only seven characters of the program name,
  5963.       placing a NUL in the eighth byte.
  5964.  
  5965. Format of MSDOS 5.0 UMB control block:
  5966. Offset    Size    Description
  5967.  00h    BYTE    type: 5Ah if last block in chain, 4Dh otherwise
  5968.  01h    WORD    first available paragraph in UMB if control block at start
  5969.         of UMB, 000Ah if control block at end of UMB
  5970.  03h    WORD    length in paragraphs of following UMB or locked-out region
  5971.  05h  3 BYTEs    unused
  5972.  08h  8 BYTEs    block type name: "UMB" if start block, "SM" if end block in UMB
  5973.  
  5974. Format of STARLITE (General Software's Embedded DOS) memory control block:
  5975. Offset    Size    Description
  5976.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  5977.  01h    WORD    PSP segment of owner, 0000h if free, 0008h if belongs to DOS
  5978.  03h    WORD    size of memory block in paragraphs
  5979.  05h    BYTE    unused
  5980.  06h    WORD    segment address of next memory control block (0000h if last)
  5981.  08h    WORD    segment address of previous memory control block or 0000h
  5982.  0Ah  6 BYTEs    reserved
  5983.  
  5984. Format of DOS 4.x data segment subsegment control blocks:
  5985. Offset    Size    Description
  5986.  00h    BYTE    subsegment type (blocks typically appear in this order)
  5987.         "D"  device driver
  5988.         "E"  device driver appendage
  5989.         "I"  IFS (Installable File System) driver
  5990.         "F"  FILES=  control block storage area (for FILES>5)
  5991.         "X"  FCBS=   control block storage area, if present
  5992.         "C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
  5993.         "B"  BUFFERS=  storage area
  5994.         "L"  LASTDRIVE=     current directory structure array storage area
  5995.         "S"  STACKS=  code and data area, if present (see below)
  5996.         "T"  INSTALL= transient code
  5997.  01h    WORD    paragraph of subsegment start (usually the next paragraph)
  5998.  03h    WORD    size of subsegment in paragraphs
  5999.  05h  3 BYTEs    unused
  6000.  08h  8 BYTEs    for types "D" and "I", base name of file from which the driver
  6001.           was loaded (unused for other types)
  6002.  
  6003. Format of data at start of STACKS code segment (if present):
  6004. Offset    Size    Description
  6005.  00h    WORD    ???
  6006.  02h    WORD    number of stacks (the x in STACKS=x,y)
  6007.  04h    WORD    size of stack control block array (should be 8*x)
  6008.  06h    WORD    size of each stack (the y in STACKS=x,y)
  6009.  08h    DWORD    pointer to STACKS data segment
  6010.  0Ch    WORD    offset in STACKS data segment of stack control block array
  6011.  0Eh    WORD    offset in STACKS data segment of last element of that array
  6012.  10h    WORD    offset in STACKS data segment of the entry in that array for
  6013.         the next stack to be allocated (initially same as value in 0Eh
  6014.         and works its way down in steps of 8 to the value in 0Ch as
  6015.         hardware interrupts pre-empt each other)
  6016. Note:    the STACKS code segment data may, if present, be located as follows:
  6017.     DOS 3.2:    The code segment data is at a paragraph boundary fairly early
  6018.         in the IBMBIO segment (seen at 0070:0190h)
  6019.     DOS 3.3:    The code segment is at a paragraph boundary in the DOS data
  6020.         segment, which may be determined by inspecting the segment
  6021.         pointers of the vectors for those of interrupts 02h, 08h-0Eh,
  6022.         70h, 72-77h which have not been redirected by device drivers or
  6023.         TSRs.
  6024.     DOS 4.x:    Identified by sub-segment control block type "S" within the DOS
  6025.         data segment.
  6026.  
  6027. Format of array elements in STACKS data segment:
  6028. Offset    Size    Description
  6029.  00h    BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
  6030.         higher stack.
  6031.  01h    BYTE    not used
  6032.  02h    WORD    previous SP
  6033.  04h    WORD    previous SS
  6034.  06h    WORD    ptr to word at top of stack (new value for SP). The word at the
  6035.         top of the stack is preset to point back to this control block.
  6036.  
  6037. SHARE.EXE hooks (DOS 3.1-5.00):
  6038. (offsets from first system file table--pointed at by ListOfLists+04h)
  6039. Offset    Size    Description
  6040. -3Ch    DWORD    pointer to FAR routine for ???
  6041.         Note: not called by MSDOS 3.3, set to 0000h:0000h by SHARE 3.3
  6042. -38h    DWORD    pointer to FAR routine called on opening file
  6043.         on call, internal DOS location points at filename(see AX=5D06h)
  6044.         Return: CF clear if successful
  6045.             CF set on error
  6046.                 AX = DOS error code (24h) (see AH=59h)
  6047.         Note: SHARE assumes DS=SS=DOS DS, direct-accesses DOS internals
  6048.             to get name of file just opened
  6049. -34h    DWORD    pointer to FAR routine called on closing file
  6050.         ES:DI -> system file table
  6051.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  6052.             does something to every lock record for file
  6053. -30h    DWORD    pointer to FAR routine to close all files for given computer
  6054.         (called by AX=5D03h)
  6055.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  6056. -2Ch    DWORD    pointer to FAR routine to close all files for given process
  6057.         (called by AX=5D04h)
  6058.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  6059. -28h    DWORD    pointer to FAR routine to close file by name
  6060.         (called by AX=5D02h)
  6061.         DS:SI -> DOS parameter list (see AX=5D00h)
  6062.            DPL's DS:DX -> name of file to close
  6063.         Return: CF clear if successful
  6064.             CF set on error
  6065.                 AX = DOS error code (03h) (see AH=59h)
  6066.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  6067. -24h    DWORD    pointer to FAR routine to lock region of file
  6068.         call with BX = file handle
  6069.               CX:DX = starting offset
  6070.               SI:AX = size
  6071.         Return: CF set on error
  6072.                 AL = DOS error code (21h) (see AH=59h)
  6073.         Note: not called if file is marked as remote
  6074.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  6075. -20h    DWORD    pointer to FAR routine to unlock region of file
  6076.         call with BX = file handle
  6077.               CX:DX = starting offset
  6078.               SI:AX = size
  6079.         Return: CF set on error
  6080.                 AL = DOS error code (21h) (see AH=59h)
  6081.         Note: not called if file is marked as remote
  6082.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  6083. -1Ch    DWORD    pointer to FAR routine to check if file region is locked
  6084.         call with ES:DI -> system file table entry for file
  6085.             CX = length of region from current position in file
  6086.         Return: CF set if any portion of region locked
  6087.                 AX = 0021h
  6088.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  6089. -18h    DWORD    pointer to FAR routine to get open file list entry
  6090.         (called by AX=5D05h)
  6091.         call with DS:SI -> DOS parameter list (see AX=5D00h)
  6092.             DPL's BX = index of sharing record
  6093.             DPL's CX = index of SFT in SFT chain of sharing rec
  6094.         Return: CF set on error or not loaded
  6095.                 AX = DOS error code (12h) (see AH=59h)
  6096.             CF clear if successful
  6097.                 ES:DI -> filename
  6098.                 CX = number of locks owned by specified SFT
  6099.                 BX = network machine number
  6100.                 DX destroyed
  6101.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  6102. -14h    DWORD    pointer to FAR routine for updating FCB from SFT???
  6103.         call with DS:SI -> unopened FCB
  6104.               ES:DI -> system file table entry
  6105.         Return: BL = C0h???
  6106.         Note: copies following fields from SFT to FCB:
  6107.            starting cluster of file      0Bh     1Ah
  6108.            sharing record offset      33h     1Ch
  6109.            file attribute          04h     1Eh
  6110. -10h    DWORD    pointer to FAR routine to get first cluster of FCB file ???
  6111.         call with ES:DI -> system file table entry
  6112.               DS:SI -> FCB
  6113.         Return: CF set if SFT closed or sharing record offsets
  6114.                 mismatched
  6115.             CF clear if successful
  6116.                 BX = starting cluster number from FCB
  6117. -0Ch    DWORD    pointer to FAR routine to close file if duplicate for process
  6118.         DS:SI -> system file table
  6119.         Return: AX = number of handle in JFT which already uses SFT
  6120.         Note: called during open/create of a file
  6121.         Note: SHARE assumes SS=DOS DS, directly accesses DOS internals
  6122.         Note: if SFT was opened with inheritance enabled and sharing
  6123.             mode 111, does something to all other SFTs owned by
  6124.             same process which have the same file open mode and
  6125.             sharing record
  6126. -08h    DWORD    pointer to FAR routine for ???
  6127.         Note: SHARE assumes SS=DS=DOS DS, direct-accesses DOS internals
  6128.         Note: closes various handles referring to file most-recently
  6129.             opened
  6130. -04h    DWORD    pointer to FAR routine to update directory info in related SFT
  6131.           entries
  6132.         call with ES:DI -> system file table entry for file (see below)
  6133.               AX = subfunction (apply to each related SFT)
  6134.                 00h: update time stamp (offset 0Dh) and date
  6135.                      stamp (offset 0Fh)
  6136.                 01h: update file size (offset 11h) and starting
  6137.                      cluster (offset 0Bh).  Sets last-accessed
  6138.                      cluster fields to start of file if file
  6139.                      never accessed
  6140.                 02h: as function 01h, but last-accessed fields
  6141.                      always changed
  6142.                 03h: do both functions 00h and 02h
  6143.         Note: follows ptr at offset 2Bh in system file table entries
  6144.         Note: NOP if opened with no-inherit or via FCB
  6145.  
  6146. Format of sharing record:
  6147. Offset    Size    Description
  6148.  00h    BYTE    flag
  6149.         00h free block
  6150.         01h allocated block
  6151.         FFh end marker
  6152.  01h    WORD    size of block
  6153.  03h    BYTE    checksum of pathname (including NUL)
  6154.         if sum of ASCII values is N, checksum is (N/256 + N%256)
  6155.  04h    WORD    offset in SHARE's DS of lock record (see below)
  6156.  06h    DWORD    pointer to start of system file table chain for file
  6157.  0Ah    WORD    unique sequence number
  6158.  0Ch    var    ASCIZ full pathname
  6159.  
  6160. Format of SHARE.EXE lock record:
  6161. Offset    Size    Description
  6162.  00h    WORD    offset in SHARE's DS of next lock table in list
  6163.  02h    DWORD    offset in file of start of locked region
  6164.  06h    DWORD    offset in file of end of locked region
  6165.  0Ah    DWORD    pointer to System File Table entry for this file
  6166.  0Eh    WORD    PSP segment of lock's owner
  6167.  
  6168. Format of DOS 2.x system file tables:
  6169. Offset    Size    Description
  6170.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6171.  04h    WORD    number of files in this table
  6172.  06h  28h bytes per file
  6173.     Offset    Size    Description
  6174.      00h    BYTE    number of file handles referring to this file
  6175.      01h    BYTE    file open mode (see AH=3Dh)
  6176.      02h    BYTE    file attribute
  6177.      03h    BYTE    drive (0 = character device, 1 = A, 2 = B, etc)
  6178.      04h 11 BYTEs    filename in FCB format (no path,no period,blank-padded)
  6179.      0Fh    WORD    ???
  6180.      11h    WORD    ???
  6181.      13h    DWORD    file size???
  6182.      17h    WORD    file date in packed format (see AX=5700h)
  6183.      19h    WORD    file time in packed format (see AX=5700h)
  6184.      1Bh    BYTE    device attribute (see AX=4400h)
  6185.     ---character device---
  6186.      1Ch    DWORD    pointer to device driver
  6187.     ---block device---
  6188.      1Ch    WORD    starting cluster of file
  6189.      1Eh    WORD    relative cluster in file of last cluster accessed
  6190.     ------
  6191.      20h    WORD    absolute cluster number of current cluster
  6192.      22h    WORD    ???
  6193.      24h    DWORD    current file position???
  6194.  
  6195. Format of DOS 3.0 system file tables and FCB tables:
  6196. Offset    Size    Description
  6197.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6198.  04h    WORD    number of files in this table
  6199.  06h  38h bytes per file
  6200.     Offset    Size    Description
  6201.      00h-1Eh as for DOS 3.1+ (see below)
  6202.      1Fh    WORD    byte offset of directory entry within sector
  6203.      21h 11 BYTES    filename in FCB format (no path/period, blank-padded)
  6204.      2Ch    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6205.      30h    WORD    (SHARE.EXE) ??? network machine number
  6206.      32h    WORD    PSP segment of file's owner (first three entries for
  6207.             AUX/CON/PRN contain segment of IO.SYS startup code)
  6208.      34h    WORD    (SHARE.EXE) offset in SHARE code seg of share record
  6209.      36h    WORD    ??? apparently always 0000h
  6210.  
  6211. Format of DOS 3.1-3.3x system file tables and FCB tables:
  6212. Offset    Size    Description
  6213.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6214.  04h    WORD    number of files in this table
  6215.  06h  35h bytes per file
  6216.     Offset    Size    Description
  6217.      00h    WORD    number of file handles referring to this file
  6218.      02h    WORD    file open mode (see AH=3Dh)
  6219.             bit 15 set if this file opened via FCB
  6220.      04h    BYTE    file attribute (see AX=4301h)
  6221.      05h    WORD    device info word (see AX=4400h)
  6222.             bit 15 set if remote file
  6223.             bit 14 set means do not set file date/time on closing
  6224.             bit 12 set means don't inherit on EXEC
  6225.             bits 5-0 drive number for disk files
  6226.      07h    DWORD    pointer to device driver header if character device
  6227.             else pointer to DOS Drive Parameter Block (see AH=32h)
  6228.      0Bh    WORD    starting cluster of file
  6229.      0Dh    WORD    file time in packed format (see AX=5700h)
  6230.      0Fh    WORD    file date in packed format (see AX=5700h)
  6231.      11h    DWORD    file size
  6232.     ---system file table---
  6233.      15h    DWORD    current offset in file (may be larger than size of
  6234.             file; INT 21/AH=42h does not check new position)
  6235.     ---FCB table---
  6236.      15h    WORD    counter for last I/O to FCB
  6237.      17h    WORD    counter for last open of FCB
  6238.             (these are separate to determine the times of the
  6239.             latest I/O and open)
  6240.     ---
  6241.      19h    WORD    relative cluster within file of last cluster accessed
  6242.      1Bh    WORD    absolute cluster number of last cluster accessed
  6243.             0000h if file never read or written???
  6244.      1Dh    WORD    number of sector containing directory entry
  6245.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  6246.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  6247.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6248.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  6249.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  6250.             entries for AUX/CON/PRN contain segment of IO.SYS
  6251.             startup code)
  6252.      33h    WORD    offset within SHARE.EXE code segment of 
  6253.             sharing record (see above)  0000h = none
  6254.  
  6255. Format of DOS 4.0-5.0 system file tables and FCB tables:
  6256. Offset    Size    Description
  6257.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6258.  04h    WORD    number of files in this table
  6259.  06h  3Bh bytes per file
  6260.     Offset    Size    Description
  6261.      00h    WORD    number of file handles referring to this file
  6262.      02h    WORD    file open mode (see AH=3Dh)
  6263.             bit 15 set if this file opened via FCB
  6264.      04h    BYTE    file attribute (see AX=4301h)
  6265.      05h    WORD    device info word (see AX=4400h)
  6266.             bit 15 set if remote file
  6267.             bit 14 set means do not set file date/time on closing
  6268.             bit 13 set if named pipe
  6269.             bit 12 set if no inherit
  6270.             bit 11 set if network spooler
  6271.      07h    DWORD    pointer to device driver header if character device
  6272.             else pointer to DOS Drive Parameter Block (see AH=32h)
  6273.             or REDIR data
  6274.      0Bh    WORD    starting cluster of file
  6275.      0Dh    WORD    file time in packed format (see AX=5700h)
  6276.      0Fh    WORD    file date in packed format (see AX=5700h)
  6277.      11h    DWORD    file size
  6278.      15h    DWORD    current offset in file
  6279.     ---local file---
  6280.      19h    WORD    relative cluster within file of last cluster accessed
  6281.      1Bh    DWORD    number of sector containing directory entry
  6282.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  6283.     ---network redirector---
  6284.      19h    DWORD    pointer to REDIRIFS record
  6285.      1Dh  3 BYTEs    ???
  6286.     ------
  6287.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  6288.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6289.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  6290.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  6291.             entries for AUX/CON/PRN contain segment of IO.SYS
  6292.             startup code)
  6293.      33h    WORD    offset within SHARE.EXE code segment of 
  6294.             sharing record (see above)  0000h = none
  6295.      35h    WORD    (local) absolute cluster number of last clustr accessed
  6296.             (redirector) ???
  6297.      37h    DWORD    pointer to IFS driver for file, 0000000h if native DOS
  6298.  
  6299. Format of current directory structure (CDS) (array, LASTDRIVE entries):
  6300. Offset    Size    Description
  6301.  00h 67 BYTEs    ASCIZ path in form X:\PATH (local) or \\MACH\PATH (network)
  6302.  43h    WORD    drive attributes (see also note below and AX=5F07h)
  6303.         bit 15: uses network redirector     \ invalid if 00, installable
  6304.             14: physical drive         / file system if 11
  6305.             13: JOIN'ed      \ path above is true path that would be
  6306.             12: SUBST'ed  / needed if not under SUBST or JOIN
  6307.  45h    DWORD    pointer to Drive Parameter Block for drive (see AH=32h)
  6308. ---local drives---
  6309.  49h    WORD    starting cluster of current directory
  6310.         0000h = root, FFFFh = never accessed
  6311.  4Bh    WORD    ??? seems to be FFFFh always
  6312.  4Dh    WORD    ??? seems to be FFFFh always
  6313. ---network drives---
  6314.  49h    DWORD    pointer to redirector or REDIRIFS record, or FFFFh:FFFFh
  6315.  4Dh    WORD    stored user data from INT 21/AX=5F03h???
  6316. ------
  6317.  4Fh    WORD    offset in current directory path of backslash corresponding to
  6318.           root directory for drive
  6319.         this value specifies how many characters to hide from the
  6320.           "CHDIR" and "GETDIR" calls; normally set to 2 to hide the
  6321.           drive letter and colon, SUBST, JOIN, and networks change it
  6322.           so that only the appropriate portion of the true path is
  6323.           visible to the user
  6324. ---DOS 4.x---
  6325.  51h    BYTE    ??? used by network
  6326.  52h    DWORD    pointer to IFS driver for this drive, 00000000h if native DOS
  6327.  56h    WORD    ???
  6328. Notes:    the path for invalid drives is normally set to X:\, but may be empty
  6329.       after JOIN x: /D in DR-DOS 5.0 or NET USE x: /D in older LAN versions
  6330.     normally, only one of bits 13&12 may be set together with bit 14, but
  6331.       DR-DOS 5.0 uses other combinations for bits 15-12: 0111 JOIN,
  6332.       0001 SUBST, 0101 ASSIGN
  6333.  
  6334. Format of DR-DOS 5.0-6.0 current directory structure entry (array):
  6335. Offset    Size    Description
  6336.  00h 67 BYTEs    ASCIZ pathname of actual root directory for this logical drive
  6337.  43h    WORD    drive attributes
  6338.         1000h SUBSTed drive
  6339.         3000h??? JOINed drive
  6340.         4000h physical drive
  6341.         5000h ASSIGNed drive
  6342.         7000h JOINed drive
  6343.         8000h network drive
  6344.  45h    BYTE    physical drive number (0=A:) if this logical drive is valid
  6345.  46h    BYTE    ??? apparently flags for JOIN and ASSIGN
  6346.  47h    WORD    cluster number of start of parent directory (0000h = root)
  6347.  49h    WORD    entry number of current directory in parent directory
  6348.  4Bh    WORD    cluster number of start of current directory
  6349.  4Dh  2 BYTEs    used for media change detection (details not available)
  6350.  4Fh    WORD    cluster number of SUBST/JOIN "root" directory
  6351.         0000h if physical root directory
  6352.  
  6353. Format of device driver header:
  6354. Offset    Size    Description
  6355.  00h    DWORD    pointer to next driver, offset=FFFFh if last driver
  6356.  04h    WORD    device attributes
  6357.         Character device:
  6358.            bit 15 set
  6359.            bit 14 IOCTL supported (see AH=44h)
  6360.            bit 13 (DOS 3+) output until busy supported
  6361.            bit 12 reserved
  6362.            bit 11 (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  6363.            bits 10-8 reserved
  6364.            bit 7  (DOS 5+) Generic IOCTL check call supported (cmd 19h)
  6365.                 (see AX=4410h,AX=4411h)
  6366.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  6367.                 (see AX=440Ch,AX=440Dh)
  6368.            bit 5  reserved
  6369.            bit 4  device is special (use INT 29 "fast console output")
  6370.            bit 3  device is CLOCK$ (all reads/writes use transfer
  6371.                 record described below)
  6372.            bit 2  device is NUL
  6373.            bit 1  device is standard output
  6374.            bit 0  device is standard input
  6375.         Block device:
  6376.            bit 15 clear
  6377.            bit 14 IOCTL supported
  6378.            bit 13 non-IBM format
  6379.            bit 12 reserved
  6380.            bit 11 (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  6381.            bit 10 reserved
  6382.            bit 9  direct I/O not allowed???
  6383.               (set by DOS 3.3 DRIVER.SYS for "new" drives)
  6384.            bit 8  ??? set by DOS 3.3 DRIVER.SYS for "new" drives
  6385.            bit 7  (DOS 5+) Generic IOCTL check call supported (cmd 19h)
  6386.                 (see AX=4410h,AX=4411h)
  6387.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  6388.                 implies support for commands 17h and 18h
  6389.                 (see AX=440Ch,AX=440Dh,AX=440Eh,AX=440Fh)
  6390.            bits 5-2 reserved
  6391.            bit 1   driver supports 32-bit sector addressing
  6392.            bit 0   reserved
  6393.         Note: for European MSDOS 4.0, bit 11 also indicates that bits
  6394.             8-6 contain a version code (000 = DOS 3.0,3.1;
  6395.             001 = DOS 3.2, 010 = European DOS 4.0)
  6396.  06h    WORD    device strategy entry point
  6397.         call with ES:BX -> request header (see INT 2F/AX=0802h)
  6398.  08h    WORD    device interrupt entry point
  6399. ---character device---
  6400.  0Ah  8 BYTEs    blank-padded character device name
  6401. ---block device---
  6402.  0Ah    BYTE    number of subunits (drives) supported by driver
  6403.  0Bh  7 BYTEs    unused
  6404. ---
  6405.  12h    WORD    (CD-ROM driver) reserved, must be 0000h
  6406.  14h    BYTE    (CD-ROM driver) drive letter (must initially be 00h)
  6407.  15h    BYTE    (CD-ROM driver) number of units
  6408.  16h  6 BYTEs    (CD-ROM driver) signature 'MSCDnn' where 'nn' is version 
  6409.             (currently '00')
  6410.  
  6411. Format of CLOCK$ transfer record:
  6412. Offset    Size    Description
  6413.  00h    WORD    number of days since 1-Jan-1980
  6414.  02h    BYTE    minutes
  6415.  03h    BYTE    hours
  6416.  04h    BYTE    hundredths of second
  6417.  05h    BYTE    seconds
  6418.  
  6419. Format of DOS 2.x disk buffer:
  6420. Offset    Size    Description
  6421.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6422.         least-recently used buffer is first in chain
  6423.  04h    BYTE    drive (0=A, 1=B, etc), FFh if not in use
  6424.  05h  3 BYTEs    unused??? (seems always to be 00h 00h 01h)
  6425.  08h    WORD    logical sector number
  6426.  0Ah    BYTE    number of copies to write (1 for non-FAT sectors)
  6427.  0Bh    BYTE    sector offset between copies if multiple copies to be written
  6428.  0Ch    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  6429.  10h        buffered data
  6430.  
  6431. Format of DOS 3.x disk buffer:
  6432. Offset    Size    Description
  6433.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6434.         least-recently used buffer is first in chain
  6435.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  6436.  05h    BYTE    flags
  6437.         bit 7: ???
  6438.         bit 6: buffer dirty
  6439.         bit 5: buffer has been referenced
  6440.         bit 4: ???
  6441.         bit 3: sector in data area
  6442.         bit 2: sector in a directory, either root or subdirectory
  6443.         bit 1: sector in FAT
  6444.         bit 0: boot sector??? (guess)
  6445.  06h    WORD    logical sector number
  6446.  08h    BYTE    number of copies to write (1 for non-FAT sectors)
  6447.  09h    BYTE    sector offset between copies if multiple copies to be written
  6448.  0Ah    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  6449.  0Eh    WORD    unused??? (almost always 0)
  6450.  10h        buffered data
  6451.  
  6452. Format of DOS 4.00 (pre UR 25066) disk buffer info:
  6453. Offset    Size    Description
  6454.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  6455.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6456.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6457.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6458.  0Ch    BYTE    00h if buffers in EMS (/X), FFh if not
  6459.  0Dh    WORD    EMS handle for buffers, zero if not in EMS
  6460.  0Fh    WORD    EMS physical page number used for buffers (usually 255)
  6461.  11h    WORD    ??? seems always to be 0001h
  6462.  13h    WORD    segment of EMS physical page frame
  6463.  15h    WORD    ??? seems always to be zero
  6464.  17h  4 WORDs    EMS partial page mapping information???
  6465.  
  6466. Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
  6467. Offset    Size    Description
  6468.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  6469.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6470.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6471.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6472.  0Ch    BYTE    01h, possibly to distinguish from pre-UR 25066 format
  6473.  0Dh    WORD    ??? EMS segment for BUFFERS (only with /XD)
  6474.  0Fh    WORD    ??? EMS physical page number of EMS seg above (only with /XD)
  6475.  11h    WORD    ??? EMS segment for ??? (only with /XD)
  6476.  13h    WORD    ??? EMS physical page number of above (only with /XD)
  6477.  15h    BYTE    ??? number of EMS page frames present (only with /XD)
  6478.  16h    WORD    segment of one-sector workspace buffer allocated in main memory
  6479.           if BUFFERS/XS or /XD options in effect, possibly to avoid DMA
  6480.           into EMS
  6481.  18h    WORD    EMS handle for buffers, zero if not in EMS
  6482.  1Ah    WORD    EMS physical page number used for buffers (usually 255)
  6483.  1Ch    WORD    ??? appears always to be 0001h
  6484.  1Eh    WORD    segment of EMS physical page frame
  6485.  20h    WORD    ??? appears always to be zero
  6486.  22h    BYTE    00h if /XS, 01h if /XD, FFh if BUFFERS not in EMS
  6487.  
  6488. Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
  6489. Offset    Size    Description
  6490.  00h    WORD    EMS logical page number in which chain is resident, -1 if not
  6491.         in EMS
  6492.  02h    DWORD    pointer to least recently used buffer header.  All buffers on
  6493.         this chain are in the same segment.
  6494.  06h    BYTE    number of dirty buffers on this chain
  6495.  07h    BYTE    reserved (00h)
  6496. Notes:    buffered disk sectors are assigned to chain N where N is the sector's
  6497.       address modulo NDBCH,     0 <= N <= NDBCH-1
  6498.     each chain resides completely within one EMS page
  6499.     this structure is in main memory even if buffers are in EMS
  6500.  
  6501. Format of DOS 4.0-5.0 disk buffer:
  6502. Offset    Size    Description
  6503.  00h    WORD    forward ptr, offset only, to next least recently used buffer
  6504.  02h    WORD    backward ptr, offset only
  6505.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  6506.  05h    BYTE    flags
  6507.         bit 7: remote buffer
  6508.         bit 6: buffer dirty
  6509.         bit 5: buffer has been referenced
  6510.         bit 4: search data buffer (only valid if remote buffer)
  6511.         bit 3: sector in data area
  6512.         bit 2: sector in a directory, either root or subdirectory
  6513.         bit 1: sector in FAT
  6514.         bit 0: reserved
  6515.  06h    DWORD    logical sector number
  6516.  0Ah    BYTE    number of copies to write
  6517.         for FAT sectors, same as number of FATs
  6518.         for data and directory sectors, usually 1
  6519.  0Bh    WORD    offset in sectors between copies to write for FAT sectors
  6520.  0Dh    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  6521.  11h    WORD    buffer use count if remote buffer (see flags above)
  6522.  13h    BYTE    reserved
  6523.  14h        buffered data
  6524. Note:    for DOS 4.x, all buffered sectors which have the same hash value
  6525.       (computed as the sum of high and low words of the logical sector
  6526.       number divided by NDBCH) are on the same doubly-linked circular
  6527.       chain; for DOS 5.0, only a single circular chain exists.
  6528.     the links consist of offset addresses only, the segment being the same
  6529.       for all buffers in the chain.
  6530.  
  6531. Format of DOS 5.0 disk buffer info:
  6532. Offset    Size    Description
  6533.  00h    DWORD    pointer to least-recently-used buffer header (may be in HMA)
  6534.         (see above)
  6535.  04h    WORD    0000h (DOS 5 does not hash disk buffers, so offset 00h points
  6536.             directly at the only buffer chain)
  6537.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6538.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6539.  0Ch    BYTE    buffer location
  6540.         00h base memory, no workspace buffer
  6541.         01h HMA, workspace buffer in base memory
  6542.  0Dh    DWORD    pointer to one-segment workspace buffer in base memory
  6543.  11h  3 BYTEs    unused???
  6544.  14h    WORD    ???
  6545.  16h    BYTE    ??? apparently always 00h
  6546.  17h    BYTE    ??? apparently always FFh
  6547.  18h    BYTE    ??? apparently always 00h
  6548.  19h    BYTE    ??? apparently always 00h
  6549.  1Ah    WORD    ??? segment within HIMEM.SYS area when buffers are in HMA and
  6550.           UMBs are enabled???, else 0000h
  6551.  1Ch    BYTE    bit 0 set iff UMB MCB chain linked to normal MCB chain
  6552.  1Dh    WORD    ???
  6553.  1Fh    WORD    segment of first MCB in upper memory blocks or FFFFh if DOS
  6554.         memory chain in base 640K only (first UMB MCB usually at 9FFFh,
  6555.         locking out video memory with a DOS-owned memory block)
  6556.  21h    WORD    paragraph of start of most recent MCB chain search
  6557.  
  6558. Format of IFS driver list:
  6559. Offset    Size    Description
  6560.  00h    DWORD    pointer to next driver header
  6561.  04h  8 BYTEs    IFS driver name (blank padded), as used by FILESYS command
  6562.  0Ch  4 BYTEs    ???
  6563.  10h    DWORD    pointer to IFS utility function entry point (see below)
  6564.         call with ES:BX -> IFS request (see below)
  6565.  14h    WORD    offset in header's segment of driver entry point
  6566.     ???
  6567.  
  6568. Call IFS utility function entry point with:
  6569.     AH = 20h miscellaneous functions
  6570.         AL = 00h get date
  6571.         Return: CX = year
  6572.             DH = month
  6573.             DL = day
  6574.         AL = 01h get process ID and computer ID
  6575.         Return: BX = current PSP segment
  6576.             DX = active network machine number
  6577.         AL = 05h get file system info
  6578.         ES:DI -> 16-byte info buffer
  6579.         Return: buffer filled
  6580.             Offset    Size    Description
  6581.              00h  2 BYTEs    unused
  6582.              02h    WORD    number of SFTs (actually counts only
  6583.                     the first two file table arrays)
  6584.              04h    WORD    number of FCB table entries
  6585.              06h    WORD    number of proctected FCBs
  6586.              08h  6 BYTEs    unused
  6587.              0Eh    WORD    largest sector size supported
  6588.         AL = 06h get machine name
  6589.         ES:DI -> 18-byte buffer for name
  6590.         Return: buffer filled with name starting at offset 02h
  6591.         AL = 08h get sharing retry count
  6592.         Return: BX = sharing retry count
  6593.         AL = other
  6594.         Return: CF set
  6595.     AH = 21h get redirection state
  6596.         BH = type (03h disk, 04h printer)
  6597.         Return: BH = state (00h off, 01h on)
  6598.     AH = 22h ??? some sort of time calculation
  6599.         AL = 00h ???
  6600.             nonzero ???
  6601.     AH = 23h ??? some sort of time calculation
  6602.     AH = 24h compare filenames
  6603.         DS:SI -> first ASCIZ filename
  6604.         ES:DI -> second ASCIZ filename
  6605.         Return: ZF set if files are same ignoring case and / vs \
  6606.     AH = 25h normalize filename
  6607.         DS:SI -> ASCIZ filename
  6608.         ES:DI -> buffer for result
  6609.         Return: filename uppercased, forward slashes changed to backslashes
  6610.     AH = 26h get DOS stack
  6611.         Return: DS:SI -> top of stack
  6612.             CX = size of stack in bytes
  6613.     AH = 27h increment InDOS flag
  6614.     AH = 28h decrement InDOS flag
  6615. Note:    IFS drivers which do not wish to implement functions 20h or 24h-28h may
  6616.       pass them on to the default handler pointed at by [LoL+37h]
  6617.  
  6618. Format of IFS request block:
  6619. Offset    Size    Description
  6620.  00h    WORD    total size in bytes of request
  6621.  02h    BYTE    class of request
  6622.         02h ???
  6623.         03h redirection
  6624.         04h ???
  6625.         05h file access
  6626.         06h convert error code to string
  6627.         07h ???
  6628.  03h    WORD    returned DOS error code
  6629.  05h    BYTE    IFS driver exit status
  6630.         00h success
  6631.         01h ???
  6632.         02h ???
  6633.         03h ???
  6634.         04h ???
  6635.         FFh internal failure
  6636.  06h 16 BYTEs    ???
  6637. ---request class 02h---
  6638.  16h    BYTE    function code
  6639.         04h ???
  6640.  17h    BYTE    unused???
  6641.  18h    DWORD    pointer to ???
  6642.  1Ch    DWORD    pointer to ???
  6643.  20h  2 BYTEs    ???
  6644. ---request class 03h---
  6645.  16h    BYTE    function code
  6646.  17h    BYTE    ???
  6647.  18h    DWORD    pointer to ???
  6648.  1Ch    DWORD    pointer to ???
  6649.  22h    WORD    returned ???
  6650.  24h    WORD    returned ???
  6651.  26h    WORD    returned ???
  6652.  28h    BYTE    returned ???
  6653.  29h    BYTE    unused???
  6654. ---request class 04h---
  6655.  16h    DWORD    pointer to ???
  6656.  1Ah    DWORD    pointer to ???
  6657. ---request class 05h---
  6658.  16h    BYTE    function code
  6659.         01h flush disk buffers
  6660.         02h get disk space
  6661.         03h MKDIR
  6662.         04h RMDIR
  6663.         05h CHDIR
  6664.         06h delete file
  6665.         07h rename file
  6666.         08h search directory
  6667.         09h file open/create
  6668.         0Ah LSEEK
  6669.         0Bh read from file
  6670.         0Ch write to file
  6671.         0Dh lock region of file
  6672.         0Eh commit/close file
  6673.         0Fh get/set file attributes
  6674.         10h printer control
  6675.         11h ???
  6676.         12h process termination
  6677.         13h ???
  6678.     ---class 05h function 01h---
  6679.      17h  7    BYTEs    ???
  6680.      1Eh    DWORD    pointer to ???
  6681.      22h  4 BYTEs    ???
  6682.      26h    BYTE    ???
  6683.      27h    BYTE    ???
  6684.     ---class 05h function 02h---
  6685.      17h  7 BYTEs    ???
  6686.      1Eh    DWORD    pointer to ???
  6687.      22h  4 BYTEs    ???
  6688.      26h    WORD    returned total clusters
  6689.      28h    WORD    returned sectors per cluster
  6690.      2Ah    WORD    returned bytes per sector
  6691.      2Ch    WORD    returned available clusters
  6692.      2Eh    BYTE    returned ???
  6693.      2Fh    BYTE    ???
  6694.     ---class 05h functions 03h,04h,05h---
  6695.      17h  7 BYTEs    ???
  6696.      1Eh    DWORD    pointer to ???
  6697.      22h  4 BYTEs    ???
  6698.      26h    DWORD    pointer to directory name
  6699.     ---class 05h function 06h---
  6700.      17h  7 BYTEs    ???
  6701.      1Eh    DWORD    pointer to ???
  6702.      22h  4 BYTEs    ???
  6703.      26h    WORD    attribute mask
  6704.      28h    DWORD    pointer to filename
  6705.     ---class 05h function 07h---
  6706.      17h  7 BYTEs    ???
  6707.      1Eh    DWORD    pointer to ???
  6708.      22h  4 BYTEs    ???
  6709.      26h    WORD    attribute mask
  6710.      28h    DWORD    pointer to source filespec
  6711.      2Ch    DWORD    pointer to destination filespec
  6712.     ---class 05h function 08h---
  6713.      17h  7 BYTEs    ???
  6714.      1Eh    DWORD    pointer to ???
  6715.      22h  4 BYTEs    ???
  6716.      26h    BYTE    00h FINDFIRST
  6717.             01h FINDNEXT
  6718.      28h    DWORD    pointer to FindFirst search data + 01h if FINDNEXT
  6719.      2Ch    WORD    search attribute if FINDFIRST
  6720.      2Eh    DWORD    pointer to filespec if FINDFIRST
  6721.     ---class 05h function 09h---
  6722.      17h  7 BYTEs    ???
  6723.      1Eh    DWORD    pointer to ???
  6724.      22h    DWORD    pointer to IFS open file structure (see below)
  6725.      26h    WORD    ???  \ together, specify open vs. create, whether or
  6726.      28h    WORD    ???  / not to truncate
  6727.      2Ah  4 BYTEs    ???
  6728.      2Eh    DWORD    pointer to filename
  6729.      32h  4 BYTEs    ???
  6730.      36h    WORD    file attributes on call
  6731.             returned ???
  6732.      38h    WORD    returned ???
  6733.     ---class 05h function 0Ah---
  6734.      17h  7 BYTEs    ???
  6735.      1Eh    DWORD    pointer to ???
  6736.      22h    DWORD    pointer to IFS open file structure (see below)
  6737.      26h    BYTE    seek type (02h = from end)
  6738.      28h    DWORD    offset on call
  6739.             returned new absolute position
  6740.     ---class 05h functions 0Bh,0Ch---
  6741.      17h  7 BYTEs    ???
  6742.      1Eh    DWORD    pointer to ???
  6743.      22h    DWORD    pointer to IFS open file structure (see below)
  6744.      28h    WORD    number of bytes to transfer
  6745.             returned bytes actually transferred
  6746.      2Ah    DWORD    transfer address
  6747.     ---class 05h function 0Dh---
  6748.      17h  7 BYTEs    ???
  6749.      1Eh    DWORD    pointer to ???
  6750.      22h    DWORD    pointer to IFS open file structure (see below)
  6751.      26h    BYTE    file handle???
  6752.      27h    BYTE    unused???
  6753.      28h    WORD    ???
  6754.      2Ah    WORD    ???
  6755.      2Ch    WORD    ???
  6756.      2Eh    WORD    ???
  6757.     ---class 05h function 0Eh---
  6758.      17h  7 BYTEs    ???
  6759.      1Eh    DWORD    pointer to ???
  6760.      22h    DWORD    pointer to IFS open file structure (see below)
  6761.      26h    BYTE    00h commit file
  6762.             01h close file
  6763.      27h    BYTE    unused???
  6764.     ---class 05h function 0Fh---
  6765.      17h  7 BYTEs    ???
  6766.      1Eh    DWORD    pointer to ???
  6767.      22h  4 BYTEs    ???
  6768.      26h    BYTE    02h GET attributes
  6769.             03h PUT attributes
  6770.      27h    BYTE    unused???
  6771.      28h 12 BYTEs    ???
  6772.      34h    WORD    search attributes???
  6773.      36h    DWORD    pointer to filename
  6774.      3Ah    WORD    (GET) returned ??? 
  6775.      3Ch    WORD    (GET) returned ???
  6776.      3Eh    WORD    (GET) returned ???
  6777.      40h    WORD    (GET) returned ???
  6778.      42h    WORD    (PUT) new attributes
  6779.             (GET) returned attributes
  6780.     ---class 05h function 10h---
  6781.      17h  7 BYTEs    ???
  6782.      1Eh    DWORD    pointer to ???
  6783.      22h    DWORD    pointer to IFS open file structure (see below)
  6784.      26h    WORD    ???
  6785.      28h    DWORD    pointer to ???
  6786.      2Ch    WORD    ???
  6787.      2Eh    BYTE    ???
  6788.      2Fh    BYTE    subfunction
  6789.             01h get printer setup
  6790.             03h ???
  6791.             04h ???
  6792.             05h ???
  6793.             06h ???
  6794.             07h ???
  6795.             21h set printer setup
  6796.     ---class 05h function 11h---
  6797.      17h  7 BYTEs    ???
  6798.      1Eh    DWORD    pointer to ???
  6799.      22h    DWORD    pointer to IFS open file structure (see below)
  6800.      26h    BYTE    subfunction
  6801.      27h    BYTE    unused???
  6802.      28h    WORD    ???
  6803.      2Ah    WORD    ???
  6804.      2Ch    WORD    ???
  6805.      2Eh    BYTE    ???
  6806.      2Fh    BYTE    ???
  6807.     ---class 05h function 12h---
  6808.      17h 15 BYTEs    unused???
  6809.      26h    WORD    PSP segment
  6810.      28h    BYTE    type of process termination
  6811.      29h    BYTE    unused???
  6812.     ---class 05h function 13h---
  6813.      17h 15 BYTEs    unused???
  6814.      26h    WORD    PSP segment
  6815. ---request class 06h---
  6816.  16h    DWORD    returned pointer to string corresponding to error code at 03h
  6817.  1Ah    BYTE    returned ???
  6818.  1Bh    BYTE    unused
  6819. ---request class 07h---
  6820.  16h    DWORD    pointer to IFS open file structure (see below)
  6821.  1Ah    BYTE    ???
  6822.  1Bh    BYTE    unused???
  6823.  
  6824. Format of IFS open file structure:
  6825. Offset    Size    Description
  6826.  00h    WORD    ???
  6827.  02h    WORD    device info word
  6828.  04h    WORD    file open mode
  6829.  06h    WORD    ???
  6830.  08h    WORD    file attributes
  6831.  0Ah    WORD    owner's network machine number
  6832.  0Ch    WORD    owner's PSP segment
  6833.  0Eh    DWORD    file size
  6834.  12h    DWORD    current offset in file
  6835.  16h    WORD    file time
  6836.  18h    WORD    file date
  6837.  1Ah 11 BYTEs    filename in FCB format
  6838.  25h    WORD    ???
  6839.  27h    WORD    hash value of SFT address
  6840.         (low word of linear address + segment&F000h)
  6841.  29h  3 WORDs    network info from SFT
  6842.  2Fh    WORD    ???
  6843.  
  6844. Format of one item in DOS 4+ list of special program names:
  6845. Offset    Size    Description
  6846.  00h    BYTE    length of name (00h = end of list)
  6847.  01h  N BYTEs    name in format name.ext
  6848.  N    2 BYTEs    DOS version to return for program (major,minor)
  6849.         (see AH=30h,INT 2F/AX=122Fh)
  6850. ---DOS 4 only---
  6851.  N+2    BYTE    number of times to return fake version number (FFh = always)
  6852. Note:    if the name of the executable for the program making the DOS "get
  6853.       version" call matches one of the names in this list, DOS returns the
  6854.       specified version rather than the true version number
  6855. ----------215252-----------------------------
  6856. INT 21 - VIRUS - "516"/"Leapfrog" - INSTALLATION CHECK
  6857.     AX = 5252h
  6858. Return: BX = FFEEh if resident
  6859. SeeAlso: AX=4BFFh"Cascade",AX=58CCh
  6860. ----------2153-------------------------------
  6861. INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
  6862.     AH = 53h
  6863.     DS:SI -> BIOS Parameter Block (see below)
  6864.     ES:BP -> buffer for Drive Parameter Block (see AH=32h for format)
  6865. Return: ES:BP buffer filled
  6866. Note:    for DOS 3+, the cluster at which to start searching is set to 0000h
  6867.       and the number of free clusters is set to FFFFh (unknown)
  6868.  
  6869. Format of BIOS Parameter Block:
  6870. Offset    Size    Description
  6871.  00h    WORD    number of bytes per sector
  6872.  02h    BYTE    number of sectors per cluster
  6873.  03h    WORD    number of reserved sectors at start of disk
  6874.  05h    BYTE    number of FATs
  6875.  06h    WORD    number of entries in root directory
  6876.  08h    WORD    total number of sectors
  6877.         for DOS 4+, set to zero if partition >32M, then set DWORD at
  6878.           15h to actual number of sectors
  6879.  0Ah    BYTE    media ID byte
  6880.  0Bh    WORD    number of sectors per FAT
  6881. ---DOS 3+---
  6882.  0Dh    WORD    number of sectors per track
  6883.  0Fh    WORD    number of heads
  6884.  11h    DWORD    number of hidden sectors
  6885.  15h 11 BYTEs    reserved    
  6886. ---DOS 4+ ---
  6887.  15h    DWORD    total number of sectors if word at 08h contains zero
  6888.  19h  6 BYTEs    ???
  6889.  1Fh    WORD    number of cylinders
  6890.  21h    BYTE    device type
  6891.  22h    WORD    device attributes (removable or not, etc)
  6892. ---European MSDOS 4.00---
  6893.  15h    DWORD    total number of sectors if word at 08h contains zero
  6894.         (however, this DOS does not actually implement >32M partitions)
  6895. ----------2154-------------------------------
  6896. INT 21 - DOS 2+ - GET VERIFY FLAG
  6897.     AH = 54h
  6898. Return: AL = verify flag
  6899.         00h off
  6900.         01h on (all disk writes verified after writing)
  6901. SeeAlso: AH=2Eh
  6902. ----------2155-------------------------------
  6903. INT 21 - DOS 2+ internal - CREATE CHILD PSP
  6904.     AH = 55h
  6905.     DX = segment at which to create new PSP
  6906.     SI = (DOS 3+) value to place in memory size field at DX:[0002h]
  6907. Return: CF clear if successful
  6908.  
  6909. Notes:    creates a "child" PSP rather than making an exact copy of the current
  6910.       PSP; the new PSP's parent pointer is set to the current PSP and the
  6911.       reference count for each inherited file is incremented
  6912.     (DOS 2+) sets current PSP to DX
  6913.     (DOS 3+) marks "no inherit" file handles as closed in child PSP
  6914. SeeAlso: AH=26h,AH=50h
  6915. ----------2156-------------------------------
  6916. INT 21 - DOS 2+ - "RENAME" - RENAME FILE
  6917.     AH = 56h
  6918.     DS:DX -> ASCIZ filename of existing file (no wildcards, but see below)
  6919.     ES:DI -> ASCIZ new filename (no wildcards)
  6920.     CL = attribute mask (server call only, see below)
  6921. Return: CF clear if successful
  6922.     CF set on error
  6923.         AX = error code (02h,03h,05h,11h) (see AH=59h)
  6924. Notes:    allows move between directories on same logical volume
  6925.     does not set the archive attribute (see AX=4300h), which results in
  6926.       incremental backups not backing up the file under its new name
  6927.     open files should not be renamed
  6928.     (DOS 3+) allows renaming of directories
  6929.     (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  6930.       error 12h (no more files) is returned on success, and both source and
  6931.       destination specs must be canonical (as returned by AH=60h).
  6932.       Wildcards in the destination are replaced by the corresponding char
  6933.       of each source file being renamed.  Under DOS 3.x, the call will fail
  6934.       if the destination wildcard is *.* or equivalent.  When invoked via
  6935.       AX=5D00h, only those files matching the attribute mask in CL are
  6936.       renamed.
  6937.     under the FlashTek X-32 DOS extender, the old-name pointer is in DS:EDX
  6938.       and the new-name pointer is in ES:EDI (DS must equal ES)
  6939. SeeAlso: AH=17h,AX=4301h,AH=60h,AX=5D00h
  6940. ----------215700-----------------------------
  6941. INT 21 - DOS 2+ - GET FILE'S DATE AND TIME
  6942.     AX = 5700h
  6943.     BX = file handle
  6944. Return: CF clear if successful
  6945.         CX = file's time
  6946.         bits 15-11: hours (0-23)
  6947.              10-5:  minutes
  6948.               4-0:  seconds/2
  6949.         DX = file's date
  6950.         bits 15-9: year - 1980
  6951.               8-5: month
  6952.               4-0: day
  6953.     CF set on error
  6954.         AX = error code (01h,06h) (see AH=59h)
  6955. SeeAlso: AX=5701h
  6956. ----------215701-----------------------------
  6957. INT 21 - DOS 2+ - SET FILE'S DATE AND TIME
  6958.     AX = 5701h
  6959.     BX = file handle
  6960.     CX = new time (see AX=5700h)
  6961.     DX = new date (see AX=5700h)
  6962. Return: CF clear if successful
  6963.     CF set on error
  6964.         AX = error code (01h,06h) (see AH=59h)
  6965. SeeAlso: AX=5700h
  6966. ----------215702-----------------------------
  6967. INT 21 - DOS 4.x only - GET ???
  6968.     AX = 5702h
  6969.     BX = ??? (0000h through 0004h)
  6970.     DS:SI -> ???
  6971.     ES:DI -> result buffer
  6972.     CX = size of result buffer
  6973. Return: CX = size of returned data
  6974. SeeAlso: AX=5703h,AX=5704h
  6975. ----------215703-----------------------------
  6976. INT 21 - DOS 4.x only - GET ???
  6977.     AX = 5703h
  6978.     BX = file handle (only 0000h through 0004h valid)
  6979.     DS:SI -> ??? passed through to INT 2F/AX=112Dh
  6980.     ES:DI -> result buffer
  6981.     CX = size of result buffer
  6982. Return: CX = size of returned data
  6983.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  6984. SeeAlso: AX=5702h,AX=5704h,INT 2F/AX=112Dh
  6985. ----------215704-----------------------------
  6986. INT 21 - DOS 4.x only - TRUNCATE OPEN FILE TO ZERO LENGTH
  6987.     AX = 5704h
  6988.     BX = file handle (only 0000h through 0004h valid)
  6989.     DS:SI -> ??? passed through to INT 2F/AX=112Dh
  6990.     ES:DI -> result buffer
  6991.     CX = size of result buffer
  6992. Return: CX = size of returned data
  6993.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  6994. SeeAlso: AX=5702h,AX=5703h,INT 2F/AX=112Dh
  6995. ----------2158-------------------------------
  6996. INT 21 - DOS 3+ - GET OR SET MEMORY ALLOCATION STRATEGY
  6997.     AH = 58h
  6998.     AL = subfunction
  6999.         00h get allocation strategy
  7000.         Return: AX = current strategy
  7001.                 00h low memory first fit
  7002.                 01h low memory best fit
  7003.                 02h low memory last fit
  7004.              ---DOS 5.0---
  7005.                 40h high memory first fit
  7006.                 41h high memory best fit
  7007.                 42h high memory last fit
  7008.                 80h first fit, try high then low memory
  7009.                 81h best fit, try high then low memory
  7010.                 82h last fit, try high then low memory
  7011.         01h set allocation strategy
  7012.         BL = new allocation strategy (see above)
  7013.         BH = 00h (DOS 5.0)
  7014. Return: CF clear if successful
  7015.     CF set on error
  7016.         AX = error code (01h) (see AH=59h)
  7017. Notes:    the Set subfunction accepts any value in BL for DOS 3.x and 4.x;
  7018.       2 or greater means last fit
  7019.     the Get subfunction returns the last value set
  7020.     a program which changes the allocation strategy should restore it
  7021.       before terminating
  7022.     Toshiba MSDOS 2.11 supports subfunctions 00h and 01h
  7023.     DR-DOS 3.41 reportedly reverses subfunctions 00h and 01h
  7024. SeeAlso: AH=48h,AH=49h,AH=4Ah,INT 2F/AX=4310h,INT 67/AH=3Fh
  7025. ----------2158-------------------------------
  7026. INT 21 - DOS 5.0 - GET OR SET UMB LINK STATE
  7027.     AH = 58h
  7028.     AL = subfunction
  7029.         02h get UMB link state
  7030.         Return: AL = 00h UMBs not part of DOS memory chain
  7031.                = 01h UMBs in DOS memory chain
  7032.         03h set UMB link state
  7033.         BX = 0000h remove UMBs from DOS memory chain
  7034.            = 0001h add UMBs to DOS memory chain
  7035. Return: CF clear if successful
  7036.     CF set on error
  7037.         AX = error code (01h) (see AH=59h)
  7038. Note:    a program which changes the UMB link state should restore it before
  7039.       terminating
  7040. ----------2158CC-----------------------------
  7041. INT 21 - VIRUS - "1067"/"Headcrash" - INSTALLATION CHECK
  7042.     AX = 58CCh
  7043. Return: CF clear if resident
  7044. SeeAlso: AX=5252h,AX=6969h
  7045. ----------2159--BX0000-----------------------
  7046. INT 21 - DOS 3+ - GET EXTENDED ERROR INFORMATION
  7047.     AH = 59h
  7048.     BX = 0000h
  7049. Return: AX = extended error code (see below)
  7050.     BH = error class (see below)
  7051.     BL = recommended action (see below)
  7052.     CH = error locus (see below)
  7053.     ES:DI may be pointer (see error code list below)
  7054.     CL, DX, SI, BP, and DS destroyed
  7055. Notes:    functions available under DOS 2.x map the true DOS 3+ error code into
  7056.       one supported under DOS 2.x
  7057.     you should call this function to retrieve the true error code when an
  7058.       FCB or DOS 2.x call returns an error
  7059. SeeAlso: AX=5D0Ah,INT 2F/AX=122Dh
  7060.  
  7061. Values for extended error code:
  7062.     00h no error
  7063.     01h function number invalid
  7064.     02h file not found
  7065.     03h path not found
  7066.     04h too many open files (no handles available)
  7067.     05h access denied
  7068.     06h invalid handle
  7069.     07h memory control block destroyed
  7070.     08h insufficient memory
  7071.     09h memory block address invalid
  7072.     0Ah environment invalid (usually >32K in length)
  7073.     0Bh format invalid
  7074.     0Ch access code invalid
  7075.     0Dh data invalid
  7076.     0Eh reserved
  7077.     0Fh invalid drive
  7078.     10h attempted to remove current directory
  7079.     11h not same device
  7080.     12h no more files
  7081. ---DOS 3+---
  7082.     13h disk write-protected
  7083.     14h unknown unit
  7084.     15h drive not ready
  7085.     16h unknown command
  7086.     17h data error (CRC)
  7087.     18h bad request structure length
  7088.     19h seek error
  7089.     1Ah unknown media type (non-DOS disk)
  7090.     1Bh sector not found
  7091.     1Ch printer out of paper
  7092.     1Dh write fault
  7093.     1Eh read fault
  7094.     1Fh general failure
  7095.     20h sharing violation
  7096.     21h lock violation
  7097.     22h disk change invalid
  7098.         ES:DI -> ASCIZ volume label of required disk
  7099.     23h FCB unavailable
  7100.     24h sharing buffer overflow
  7101.     25h (DOS 4+) code page mismatch
  7102.     26h (DOS 4+) cannot complete file operation (out of input)
  7103.     27h (DOS 4+) insufficient disk space
  7104.     28h-31h reserved
  7105.     32h network request not supported
  7106.     33h remote computer not listening
  7107.     34h duplicate name on network
  7108.     35h network name not found
  7109.     36h network busy
  7110.     37h network device no longer exists
  7111.     38h network BIOS command limit exceeded
  7112.     39h network adapter hardware error
  7113.     3Ah incorrect response from network
  7114.     3Bh unexpected network error
  7115.     3Ch incompatible remote adapter
  7116.     3Dh print queue full
  7117.     3Eh queue not full
  7118.     3Fh not enough space to print file
  7119.     40h network name was deleted
  7120.     41h network: Access denied
  7121.     42h network device type incorrect
  7122.     43h network name not found
  7123.     44h network name limit exceeded
  7124.     45h network BIOS session limit exceeded
  7125.     46h temporarily paused
  7126.     47h network request not accepted
  7127.     48h network print/disk redirection paused
  7128.     49h (LANtastic) invalid network version
  7129.     4Ah (LANtastic) account expired
  7130.     4Bh (LANtastic) password expired
  7131.     4Ch (LANtastic) login attempt invalid at this time
  7132.     4Dh (LANtastic v3+) disk limit exceeded on network node
  7133.     4Eh (LANtastic v3+) not logged in to network node
  7134.     4Fh reserved
  7135.     50h file exists
  7136.     51h reserved
  7137.     52h cannot make directory
  7138.     53h fail on INT 24h
  7139.     54h (DOS 3.3+) too many redirections
  7140.     55h (DOS 3.3+) duplicate redirection
  7141.     56h (DOS 3.3+) invalid password
  7142.     57h (DOS 3.3+) invalid parameter
  7143.     58h (DOS 3.3+) network write fault
  7144.     59h (DOS 4+) function not supported on network
  7145.     5Ah (DOS 4+) required system component not installed
  7146.  
  7147. Values for Error Class:
  7148.     01h out of resource (storage space or I/O channels)
  7149.     02h temporary situation (file or record lock)
  7150.     03h authorization (denied access)
  7151.     04h internal (system software bug)
  7152.     05h hardware failure
  7153.     06h system failure (configuration file missing or incorrect)
  7154.     07h application program error
  7155.     08h not found
  7156.     09h bad format
  7157.     0Ah locked
  7158.     0Bh media error
  7159.     0Ch already exists
  7160.     0Dh unknown
  7161.  
  7162. Values for Suggested Action:
  7163.     01h retry
  7164.     02h delayed retry
  7165.     03h prompt user to reenter input
  7166.     04h abort after cleanup
  7167.     05h immediate abort
  7168.     06h ignore
  7169.     07h retry after user intervention
  7170.  
  7171. Values for Error Locus:
  7172.     01h unknown or not appropriate
  7173.     02h block device (disk error)
  7174.     03h network related
  7175.     04h serial device (timeout)
  7176.     05h memory related
  7177. ----------2159--BX0001-----------------------
  7178. INT 21 - European MSDOS 4.0 - GET HARD ERROR INFORMATION
  7179.     AH = 59h
  7180.     BX = 0001h
  7181. Return: ES:DI -> hard error information packet (see below) for most recent
  7182.         hard (critical) error
  7183. SeeAlso: AH=95h,INT 24
  7184.  
  7185. Format of hard error information packet:
  7186. Offset    Size    Description
  7187.  00h    WORD    contents of AX at system entry
  7188.  02h    WORD    Process ID which encountered error
  7189.  04h    WORD    contents of AX at time of error
  7190.  06h    BYTE    error type
  7191.         00h physical I/O error
  7192.         01h disk change request
  7193.         02h file sharing violation
  7194.         03h FCB problem
  7195.         04h file locking violation
  7196.         05h bad FAT
  7197.         06h network detected error
  7198.  07h    BYTE    INT 24 error code
  7199.  08h    WORD    extended error code (see AH=59h/BX=0000h)
  7200.  0Ah    DWORD    pointer to associated device
  7201. ----------215A-------------------------------
  7202. INT 21 - DOS 3+ - CREATE TEMPORARY FILE
  7203.     AH = 5Ah
  7204.     CX = file attribute (see AX=4301h)
  7205.     DS:DX -> ASCIZ path ending with a '\' + 13 zero bytes to receive the
  7206.         generated filename
  7207. Return: CF clear if successful
  7208.         AX = file handle opened for read/write in compatibility mode
  7209.         DS:DX pathname extended with generated name for temporary file
  7210.     CF set on error
  7211.         AX = error code (03h,04h,05h) (see AH=59h)
  7212. Notes:    creates a file with a unique name which must be explicitly deleted
  7213.     COMPAQ DOS 3.31 hangs if the pathname is at XXXXh:0000h; it apparently
  7214.       wraps around to the end of the segment
  7215.     under the FlashTek X-32 DOS extender, the path pointer is in DS:EDX
  7216. SeeAlso: AH=3Ch,AH=5Bh
  7217. ----------215B-------------------------------
  7218. INT 21 - DOS 3+ - CREATE NEW FILE
  7219.     AH = 5Bh
  7220.     CX = file attribute (see AX=4301h)
  7221.     DS:DX -> ASCIZ filename
  7222. Return: CF clear if successful
  7223.         AX = file handle opened for read/write in compatibility mode
  7224.     CF set on error
  7225.         AX = error code (03h,04h,05h,50h) (see AH=59h)
  7226. Notes:    unlike AH=3Ch, this function will fail if the specified file exists
  7227.       rather than truncating it; this permits its use in creating semaphore
  7228.       files because it is an atomic "test and set" operation
  7229.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  7230. SeeAlso: AH=3Ch,AH=5Ah
  7231. ----------215C-------------------------------
  7232. INT 21 - DOS 3+ - "FLOCK" - RECORD LOCKING
  7233.     AH = 5Ch
  7234.     AL = subfunction
  7235.         00h lock region of file
  7236.         01h unlock region of file
  7237.     BX = file handle
  7238.     CX:DX = start offset of region within file
  7239.     SI:DI = length of region in bytes
  7240. Return: CF clear if successful
  7241.     CF set on error
  7242.         AX = error code (01h,06h,21h,24h) (see AH=59h)
  7243. Notes:    error returned unless SHARE or network installed
  7244.     an unlock call must specify the same region as some prior lock call
  7245.     locked regions become entirely inaccessible to other processes
  7246.     duplicate handles created with AH=45h or AH=46h inherit locks, but
  7247.       handles inherited by child processes (see AH=4Bh) do not
  7248. SeeAlso: AX=440Bh,AH=BCh,AH=BEh,INT 2F/AX=110Ah,INT 2F/AX=110Bh
  7249. ----------215D00-----------------------------
  7250. INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
  7251.     AX = 5D00h
  7252.     DS:DX -> DOS parameter list (see below)
  7253.     DPL contains all register values for a call to INT 21h
  7254. Return: as appropriate for function being called
  7255. Notes:    does not check AH.  Out of range values will crash the system
  7256.     executes using specified computer ID and process ID
  7257.     sharing delay loops skipped
  7258.     a special sharing mode is enabled
  7259.     wildcards are enabled for DELETE (AH=41h) and RENAME (AH=56h)
  7260.     an extra file attribute parameter is enabled for OPEN (AH=3Dh),
  7261.       DELETE (AH=41h), and RENAME (AH=56h)
  7262.     functions which take filenames require canonical names (as returned
  7263.       by AH=60h); this is apparently to prevent multi-hop file forwarding
  7264. SeeAlso: AH=3Dh,AH=41h,AH=56h,AH=60h
  7265.  
  7266. Format of DOS parameter list:
  7267. Offset    Size    Description
  7268.  00h    WORD    AX 
  7269.  02h    WORD    BX
  7270.  04h    WORD    CX
  7271.  06h    WORD    DX
  7272.  08h    WORD    SI
  7273.  0Ah    WORD    DI
  7274.  0Ch    WORD    DS
  7275.  0Eh    WORD    ES
  7276.  10h    WORD    reserved (0)
  7277.  12h    WORD    computer ID (0 = current system)
  7278.  14h    WORD    process ID (PSP segment on specified computer)
  7279. ----------215D01-----------------------------
  7280. INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
  7281.     AX = 5D01h
  7282.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  7283.         process ID fields used
  7284. Return: CF set on error
  7285.         AX = error code (see AH=59h)
  7286.     CF clear if successful
  7287. Notes:    flushes buffers and updates directory entries for each file which has
  7288.       been written to; if remote file, calls INT 2F/AX=1107h
  7289.     the computer ID and process ID are stored but ignored under DOS 3.3
  7290. SeeAlso: AH=0Dh,AH=68h,INT 2F/AX=1107h
  7291. ----------215D02-----------------------------
  7292. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
  7293.     AX = 5D02h
  7294.     DS:DX -> DOS parameter list (see AX=5D00h), only fields DX, DS,
  7295.         computer ID, and process ID used
  7296.     DPL's DS:DX -> ASCIZ name of file to close
  7297. Return: CF set on error
  7298.         AX = error code (see AH=59h)
  7299.     CF clear if successful
  7300. Notes:    error unless SHARE is loaded (calls [SysFileTable-28h]) (see AH=52h)
  7301.     name must be canonical fully-qualified, such as returned by AH=60h
  7302. SeeAlso: AX=5D03h,AX=5D04h,AH=3Eh,AH=60h
  7303. ----------215D03-----------------------------
  7304. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
  7305.     AX = 5D03h
  7306.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID used
  7307. Return: CF set on error
  7308.         AX = error code (see AH=59h)
  7309.     CF clear if successful
  7310. Note:    error unless SHARE is loaded (calls [SysFileTable-30h]) (see AH=52h)
  7311. SeeAlso: AX=5D02h,AX=5D04h
  7312. ----------215D04-----------------------------
  7313. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
  7314.     AX = 5D04h
  7315.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  7316.         process ID fields used
  7317. Return: CF set on error
  7318.         AX = error code (see AH=59h)
  7319.     CF clear if successful
  7320. Note:    error unless SHARE is loaded (calls [SysFileTable-2Ch]) (see AH=52h)
  7321. SeeAlso: AX=5D02h,AX=5D03h,INT 2F/AX=111Dh
  7322. ----------215D05-----------------------------
  7323. INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
  7324.     AX = 5D05h
  7325.     DS:DX -> DOS parameter list (see AX=5D00h)
  7326.     DPL's BX = index of sharing record (see AH=52h)
  7327.     DPL's CX = index of SFT in sharing record's SFT list
  7328. Return: CF clear if successful
  7329.         ES:DI -> ASCIZ filename
  7330.         BX = network machine number of SFT's owner
  7331.         CX = number of locks held by SFT's owner
  7332.     CF set if either index out of range
  7333.         AX = 0012h (no more files)
  7334. Notes:    error unless SHARE is loaded (calls [SysFileTable-18h]) (see AH=52h)
  7335.     names are always canonical fully-qualified, such as returned by AH=60h
  7336. SeeAlso: AH=5Ch,AH=60h 
  7337. ----------215D06-----------------------------
  7338. INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
  7339.     AX = 5D06h
  7340. Return: CF set on error
  7341.        AX = error code (see AH=59h)
  7342.     CF clear if successful
  7343.         DS:SI -> nonreentrant data area (includes all three DOS stacks)
  7344.         (critical error flag is first byte)
  7345.         CX = size in bytes of area which must be swapped while in DOS
  7346.         DX = size in bytes of area which must always be swapped
  7347. Notes:    the Critical Error flag is used in conjunction with the InDOS flag
  7348.       (see AH=34h) to determine when it is safe to enter DOS from a TSR
  7349.     setting CritErr flag allows use of functions 50h/51h from INT 28h under
  7350.       DOS 2.x by forcing use of correct stack
  7351.     swapping the data area allows reentering DOS unless DOS is in a
  7352.       critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
  7353.     under DOS 4.0, AX=5D0Bh should be used instead of this function
  7354. SeeAlso: AX=5D0Bh,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
  7355.  
  7356. Format of DOS 3.10-3.30 Swappable Data Area:
  7357. Offset    Size    Description
  7358.  00h    BYTE    critical error flag
  7359.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  7360.  02h    BYTE    drive on which current critical error occurred, or FFh
  7361.  03h    BYTE    locus of last error
  7362.  04h    WORD    extended error code of last error
  7363.  06h    BYTE    suggested action for last error
  7364.  07h    BYTE    class of last error
  7365.  08h    DWORD    ES:DI pointer for last error
  7366.  0Ch    DWORD    current DTA
  7367.  10h    WORD    current PSP
  7368.  12h    WORD    stores SP across an INT 23
  7369.  14h    WORD    return code from last process termination (zerod after reading
  7370.         with AH=4Dh)
  7371.  16h    BYTE    current drive
  7372.  17h    BYTE    extended break flag
  7373. ---remainder need only be swapped if in DOS---
  7374.  18h    WORD    value of AX on call to INT 21
  7375.  1Ah    WORD    PSP segment for sharing/network
  7376.  1Ch    WORD    network machine number for sharing/network (0000h = us)
  7377.  1Eh    WORD    first usable memory block found when allocating memory
  7378.  20h    WORD    best usable memory block found when allocating memory
  7379.  22h    WORD    last usable memory block found when allocating memory
  7380.  24h    WORD    memory size in paragraphs (used only during initialization)
  7381.  26h    WORD    ???
  7382.  28h    BYTE    INT 24 returned Fail
  7383.  29h    BYTE    bit flags for allowable actions on INT 24
  7384.  2Ah    BYTE    ??? flag
  7385.  2Bh    BYTE    FFh if Ctrl-Break termination, 00h otherwise
  7386.  2Ch    BYTE    ??? flag of some kind
  7387.  2Dh    BYTE    ??? (doesn't seem to be referenced)
  7388.  2Eh    BYTE    day of month
  7389.  2Fh    BYTE    month
  7390.  30h    WORD    year - 1980
  7391.  32h    WORD    number of days since 1-1-1980
  7392.  34h    BYTE    day of week (0 = Sunday)
  7393.  35h    BYTE    working SFT pointer at SDA+2AAh is valid ???
  7394.  36h    BYTE    safe to call INT 28 if nonzero
  7395.  37h    BYTE    flag: if nonzero, INT 24 abort turned into INT 24 fail
  7396.         (set only during process termination)
  7397.  38h 26 BYTEs    device driver request header (see INT 2F/AX=0802h)
  7398.  52h    DWORD    pointer to device driver entry point (used in calling driver)
  7399.  56h 22 BYTEs    device driver request header
  7400.  6Ch 22 BYTEs    device driver request header
  7401.  82h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  7402.  83h    BYTE    ??? apparently not referenced by kernel
  7403.  84h  3 BYTEs    24-bit user number (see AH=30h)
  7404.  87h    BYTE    OEM number (see AH=30h)
  7405.  88h  2 BYTEs    ???
  7406.  8Ah  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  7407.  90h    BYTE    ??? buffer for single-byte I/O functions
  7408.  91h    BYTE    ??? apparently not referenced by kernel
  7409.  92h 128 BYTEs    buffer for filename
  7410. 112h 128 BYTEs    buffer for filename
  7411. 192h 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  7412. 1A7h 32 BYTEs    directory entry for found file
  7413. 1C7h 81 BYTEs    copy of current directory structure for drive being accessed
  7414. 218h 11 BYTEs    FCB-format filename for device name comparison
  7415. 223h    BYTE    unused???
  7416. 224h 11 BYTEs    wildcard destination specification for rename (FCB format)
  7417. 22Fh  2 BYTEs    ???
  7418. 231h    WORD    ???
  7419. 233h  5 BYTEs    ???
  7420. 238h    BYTE    extended FCB file attribute
  7421. 239h    BYTE    type of FCB (00h regular, FFh extended)
  7422. 23Ah    BYTE    directory search attributes
  7423. 23Bh    BYTE    file open mode???
  7424. 23Ch    BYTE    ??? flag bits 0 and 4
  7425. 23Dh    BYTE    ??? flag or counter
  7426. 23Eh    BYTE    ??? flag
  7427. 23Fh    BYTE    flag indicating how DOS function was invoked
  7428.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  7429. 240h    BYTE    ???
  7430. 241h    BYTE    ??? flag
  7431. 242h    BYTE    flag: 00h if read, 01h if write
  7432. 243h    BYTE    drive number for ???
  7433. 244h    BYTE    ???
  7434. 245h    BYTE    ??? flag or counter
  7435. 246h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  7436. 247h    BYTE    canonicalized filename referred to existing file/dir if FFh
  7437. 248h    BYTE    ??? flag or counter
  7438. 249h    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  7439. 24Ah    BYTE    ??? flag
  7440. 24Bh    BYTE    value with which to replace first byte of deleted file's name
  7441.         (normally E5h, but 00h as described under INT 21/AH=13h)
  7442. 24Ch    DWORD    pointer to Drive Parameter Block for critical error invocation
  7443. 250h    DWORD    pointer to stack frame containing user registers on INT 21
  7444. 254h    WORD    stores SP across INT 24
  7445. 256h    DWORD    pointer to DOS Drive Parameter Block for ???
  7446. 25Ah    WORD    ???
  7447. 25Ch    WORD    ??? temp
  7448. 25Eh    WORD    ??? flag (only low byte referenced)
  7449. 260h    WORD    ??? temp
  7450. 262h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  7451. 263h    BYTE    ??? (doesn't seem to be referenced)
  7452. 264h    DWORD    pointer to device header
  7453. 268h    DWORD    pointer to current SFT
  7454. 26Ch    DWORD    pointer to current directory structure for drive being accessed
  7455. 270h    DWORD    pointer to caller's FCB
  7456. 274h    WORD    number of SFT to which file being opened will refer
  7457. 276h    WORD    temporary storage for file handle
  7458. 278h    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  7459. 27Ch    WORD    offset in DOS DS of first filename argument
  7460. 27Eh    WORD    offset in DOS DS of second filename argument
  7461. 280h    WORD    offset of last component in pathname or FFFFh
  7462. 282h    WORD    ??? offset of transfer address???
  7463. 284h    WORD    ??? relative cluster within file being accessed ???
  7464. 286h    WORD    ??? absolute cluster number being accessed ???
  7465. 288h    WORD    ??? current sector number
  7466. 28Ah    WORD    ??? current cluster number
  7467. 28Ch    WORD    ??? current offset in file DIV bytes per sector
  7468. 28Eh  2 BYTEs    ??? 
  7469. 290h    WORD    ??? current offset in file MOD bytes per sector
  7470. 292h    DWORD    current offset in file
  7471. 296h    WORD    ???
  7472. 298h    WORD    ???
  7473. 29Ah    WORD    ???
  7474. 29Ch    WORD    ???
  7475. 29Eh    WORD    ???
  7476. 2A0h    WORD    ???
  7477. 2A2h    DWORD    number of bytes appended to file
  7478. 2A6h    DWORD    pointer to ??? disk buffer
  7479. 2AAh    DWORD    pointer to working SFT
  7480. 2AEh    WORD    used by INT 21 dispatcher to store caller's BX
  7481. 2B0h    WORD    used by INT 21 dispatcher to store caller's DS
  7482. 2B2h    WORD    temporary storage while saving/restoring caller's registers
  7483. 2B4h    DWORD    pointer to prev call frame (offset 250h) if INT 21 reentered
  7484.         also switched to for duration of INT 24
  7485. 2B8h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  7486.         (see AH=4Eh)
  7487. 2CDh 32 BYTEs    directory entry for file being renamed
  7488. 2EDh 331 BYTEs    critical error stack
  7489.    403h     35 BYTEs scratch SFT
  7490. 438h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  7491. 5B8h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  7492. ---DOS 3.2,3.3 only---
  7493. 738h    BYTE    device driver lookahead flag (see AH=64h)
  7494. 739h    BYTE    ??? looks like a drive number
  7495. 73Ah    BYTE    ??? flag of some kind
  7496. 73Ah    BYTE    ???
  7497. ----------215D07-----------------------------
  7498. INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
  7499.     AX = 5D07h
  7500. Return: DL = mode
  7501.         00h redirected output is combined
  7502.         01h redirected output in separate print jobs
  7503. SeeAlso: AX=5D08h,AX=5D09h,INT 2F/AX=1125h
  7504. ----------215D08-----------------------------
  7505. INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
  7506.     AX = 5D08h
  7507.     DL = mode
  7508.         00h redirected output is combined
  7509.         01h redirected output placed in separate jobs, start new print job
  7510.         now
  7511. SeeAlso: AX=5D07h,AX=5D09h,INT 2F/AX=1125h
  7512. ----------215D09-----------------------------
  7513. INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
  7514.     AX = 5D09h
  7515. Note:    forces redirected printer output to be printed, and starts a new print
  7516.       job
  7517. SeeAlso: AX=5D07h,AX=5D08h,INT 2F/AX=1125h
  7518. ----------215D0A-----------------------------
  7519. INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
  7520.     AX = 5D0Ah
  7521.     DS:DX -> 11-word DOS parameter list (see AX=5D00h)
  7522. Return: nothing.  next call to AH=59h will return values from fields AX,BX,CX,
  7523.       DX,DI, and ES in corresponding registers
  7524. Note:    documented for DOS 5+, but undocumented in earlier versions
  7525. SeeAlso: AH=59h
  7526. ----------215D0B-----------------------------
  7527. INT 21 U - DOS 4.x only internal - GET DOS SWAPPABLE DATA AREAS
  7528.     AX = 5D0Bh
  7529. Return: CF set on error
  7530.         AX = error code (see AH=59h)
  7531.     CF clear if successful
  7532.         DS:SI -> swappable data area list (see below)
  7533. Note:    copying and restoring the swappable data areas allows DOS to be
  7534.       reentered unless it is in a critical section delimited by calls to
  7535.       INT 2A/AH=80h and INT 2A/AH=81h,82h
  7536. SeeAlso: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
  7537.  
  7538. Format of DOS 4.x swappable data area list:
  7539. Offset    Size    Description
  7540.  00h    WORD    count of data areas
  7541.  02h  N BYTEs    "count" copies of data area record
  7542.         Offset    Size    Description
  7543.          00h    DWORD    address
  7544.          04h    WORD    length and type
  7545.                 bit 15 set if swap always, clear if swap in DOS
  7546.                 bits 14-0: length in bytes
  7547.  
  7548. Format of DOS 4.0-5.0 swappable data area:
  7549. Offset    Size    Description
  7550.  00h    BYTE    critical error flag
  7551.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  7552.  02h    BYTE    drive on which current critical error occurred or FFh
  7553.  03h    BYTE    locus of last error
  7554.  04h    WORD    extended error code of last error
  7555.  06h    BYTE    suggested action for last error
  7556.  07h    BYTE    class of last error
  7557.  08h    DWORD    ES:DI pointer for last error
  7558.  0Ch    DWORD    current DTA
  7559.  10h    WORD    current PSP
  7560.  12h    WORD    stores SP across an INT 23
  7561.  14h    WORD    return code from last process termination (zerod after reading
  7562.         with AH=4Dh)
  7563.  16h    BYTE    current drive
  7564.  17h    BYTE    extended break flag
  7565.  18h  2 BYTEs    ???
  7566. ---remainder need only be swapped if in DOS---
  7567.  1Ah    WORD    value of AX on call to INT 21
  7568.  1Ch    WORD    PSP segment for sharing/network
  7569.  1Eh    WORD    network machine number for sharing/network (0000h = us)
  7570.  20h    WORD    first usable memory block found when allocating memory
  7571.  22h    WORD    best usable memory block found when allocating memory
  7572.  24h    WORD    last usable memory block found when allocating memory
  7573.  26h    WORD    memory size in paragraphs (used only during initialization)
  7574.  28h    WORD    ???
  7575.  2Ah    BYTE    ???
  7576.  2Bh    BYTE    ???
  7577.  2Ch    BYTE    ???
  7578.  2Dh    BYTE    ???
  7579.  2Eh    BYTE    ???
  7580.  2Fh    BYTE    ??? (doesn't seem to be referenced)
  7581.  30h    BYTE    day of month
  7582.  31h    BYTE    month
  7583.  32h    WORD    year - 1980
  7584.  34h    WORD    number of days since 1-1-1980
  7585.  36h    BYTE    day of week (0 = Sunday)
  7586.  37h    BYTE    ???
  7587.  38h    BYTE    ???
  7588.  39h    BYTE    ???
  7589.  3Ah 30 BYTEs    device driver request header (see INT 2F/AX=0802h)
  7590.  58h    DWORD    pointer to device driver entry point (used in calling driver)
  7591.  5Ch 22 BYTEs    device driver request header
  7592.  72h 30 BYTEs    device driver request header
  7593.  90h  6    BYTEs    ???
  7594.  96h  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  7595.  9Ch  2 BYTEs    ???
  7596.  9Eh 128 BYTEs    buffer for filename
  7597. 11Eh 128 BYTEs    buffer for filename
  7598. 19Eh 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  7599. 1B3h 32 BYTEs    directory entry for found file
  7600. 1D3h 88 BYTEs    copy of current directory structure for drive being accessed
  7601. 22Bh 11 BYTEs    FCB-format filename for device name comparison
  7602. 236h    BYTE    ???
  7603. 237h 11 BYTEs    wildcard destination specification for rename (FCB format)
  7604. 242h  2 BYTEs    ???
  7605. 244h    WORD    ???
  7606. 246h  5 BYTEs    ???
  7607. 24Bh    BYTE    extended FCB file attributes
  7608. 24Ch    BYTE    type of FCB (00h regular, FFh extended)
  7609. 24Dh    BYTE    directory search attributes
  7610. 24Eh    BYTE    file open mode
  7611. 24Fh    BYTE    ??? flag bits
  7612. 250h    BYTE    ??? flag or counter
  7613. 251h    BYTE    ??? flag
  7614. 252h    BYTE    flag indicating how DOS function was invoked
  7615.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  7616. 253h    BYTE    ???
  7617. 254h    BYTE    ???
  7618. 255h    BYTE    ???
  7619. 256h    BYTE    ???
  7620. 257h    BYTE    ???
  7621. 258h    BYTE    ???
  7622. 259h    BYTE    ???
  7623. 25Ah    BYTE    canonicalized filename referred to existing file/dir if FFh
  7624. 25Bh    BYTE    ???
  7625. 25Ch    BYTE    type of process termination (00h-03h)
  7626. 25Dh    BYTE    ???
  7627. 25Eh    BYTE    ???
  7628. 25Fh    BYTE    ???
  7629. 260h    DWORD    pointer to Drive Parameter Block for critical error invocation
  7630. 264h    DWORD    pointer to stack frame containing user registers on INT 21
  7631. 268h    WORD    stores SP???
  7632. 26Ah    DWORD    pointer to DOS Drive Parameter Block for ???
  7633. 26Eh    WORD    segment of disk buffer
  7634. 270h    WORD    ???
  7635. 272h    WORD    ???
  7636. 274h    WORD    ???
  7637. 276h    WORD    ???
  7638. 278h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  7639. 279h    BYTE    ??? (doesn't seem to be referenced)
  7640. 27Ah    DWORD    pointer to ???
  7641. 27Eh    DWORD    pointer to current SFT
  7642. 282h    DWORD    pointer to current directory structure for drive being accessed
  7643. 286h    DWORD    pointer to caller's FCB
  7644. 28Ah    WORD    SFT index to which file being opened will refer
  7645. 28Ch    WORD    temporary storage for file handle
  7646. 28Eh    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  7647. 292h    WORD    offset in DOS DS of first filename argument
  7648. 294h    WORD    offset in DOS DS of second filename argument
  7649. 296h    WORD    ???
  7650. 298h    WORD    ???
  7651. 29Ah    WORD    ???
  7652. 29Ch    WORD    ???
  7653. 29Eh    WORD    ???
  7654. 2A0h    WORD    ???
  7655. 2A2h    WORD    ??? directory cluster number???
  7656. 2A4h    DWORD    ???
  7657. 2A8h    DWORD    ???
  7658. 2ACh    WORD    ???
  7659. 2AEh    DWORD    offset in file???
  7660. 2B2h    WORD    ???
  7661. 2B4h    WORD    bytes in partial sector
  7662. 2B6h    WORD    number of sectors
  7663. 2B8h    WORD    ???
  7664. 2BAh    WORD    ???
  7665. 2BCh    WORD    ???
  7666. 2BEh    DWORD    number of bytes appended to file
  7667. 2C2h    DWORD    pointer to ??? disk buffer
  7668. 2C6h    DWORD    pointer to ??? SFT
  7669. 2CAh    WORD    used by INT 21 dispatcher to store caller's BX
  7670. 2CCh    WORD    used by INT 21 dispatcher to store caller's DS
  7671. 2CEh    WORD    temporary storage while saving/restoring caller's registers
  7672. 2D0h    DWORD    pointer to prev call frame (offset 264h) if INT 21 reentered
  7673.         also switched to for duration of INT 24
  7674. 2D4h    WORD    open mode/action for INT 21/AX=6C00h
  7675. 2D6h    BYTE    ??? (set to 00h by INT 21h dispatcher, 02h when a read is
  7676.         performed, and 01h or 03h by INT 21/AX=6C00h)
  7677. 2D7h    WORD    ??? apparently unused
  7678. 2D9h    DWORD    stored ES:DI for AX=6C00h
  7679. 2DDh    WORD    extended file open action code (see AX=6C00h)
  7680. 2DFh    WORD    extended file open attributes (see AX=6C00h)
  7681. 2E1h    WORD    extended file open file mode (see AX=6C00h)
  7682. 2E3h    DWORD    pointer to filename to open (see AX=6C00h)
  7683. 2E7h    WORD    ???
  7684. 2E9h    WORD    ???
  7685. 2EBh    BYTE    ???
  7686. 2ECh    WORD    stores DS during call to [List-of-Lists + 37h]
  7687. 2EEh    WORD    ???
  7688. 2F0h    BYTE    ???
  7689. 2F1h    WORD    ??? bit flags
  7690. 2F3h    DWORD    pointer to user-supplied filename
  7691. 2F7h    DWORD    pointer to ???
  7692. 2FBh    WORD    stores SS during call to [List-of-Lists + 37h]
  7693. 2FDh    WORD    stores SP during call to [List-of-Lists + 37h]
  7694. 2FFh    BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
  7695. 300h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  7696.         (see AH=4Eh)
  7697. 315h 32 BYTEs    directory entry for file being renamed
  7698. 335h 331 BYTEs    critical error stack
  7699. 480h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  7700. 600h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  7701. 780h    BYTE    device driver lookahead flag (see AH=64h)
  7702. 781h    BYTE    ??? looks like a drive number
  7703. 782h    BYTE    ??? flag of some kind
  7704. 783h    BYTE    ???
  7705. 784h    WORD    ???
  7706. 786h    WORD    ???
  7707. 788h    WORD    ???
  7708. 78Ah    WORD    ???
  7709. ----------215E00-----------------------------
  7710. INT 21 - DOS 3.1+ network - GET MACHINE NAME
  7711.     AX = 5E00h
  7712.     DS:DX -> 16-byte buffer for ASCIZ machine name
  7713. Return: CF clear if successful
  7714.         CH = validity
  7715.         00h name invalid
  7716.         nonzero valid
  7717.             CL = NetBIOS number for machine name
  7718.             DS:DX buffer filled with blank-paded name
  7719.     CF set on error
  7720.         AX = error code (01h) (see AH=59h)
  7721. Note:    supported by OS/2 v1.3+ compatibility box, PC-NFS
  7722. SeeAlso: AX=5E01h
  7723. ----------215E01CH00-------------------------
  7724. INT 21 - DOS 3.1+ network - SET MACHINE NAME
  7725.     AX = 5E01h
  7726.     CH = 00h undefine name (make it invalid)
  7727.        <> 0     define name
  7728.     CL = name number
  7729.     DS:DX -> 15-character blank-padded ASCIZ name
  7730. SeeAlso: AX=5E00h
  7731. ----------215E02-----------------------------
  7732. INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
  7733.     AX = 5E02h
  7734.     BX = redirection list index (see AX=5F02h)
  7735.     CX = length of setup string
  7736.     DS:SI -> setup string
  7737. Return: CF clear if successful
  7738.     CF set on error
  7739.         AX = error code (01h) (see AH=59h)
  7740. SeeAlso: AX=5E03h,INT 2F/AX=111Fh
  7741. ----------215E03-----------------------------
  7742. INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
  7743.     AX = 5E03h
  7744.     BX = redirection list index (see AX=5F02h)
  7745.     ES:DI -> 64-byte buffer for setup string
  7746. Return: CF clear if successful
  7747.         CX = length of setup string
  7748.         ES:DI buffer filled
  7749.     CF set on error
  7750.         AX = error code (01h) (see AH=59h)
  7751. SeeAlso: AX=5E02h,INT 2F/AX=111Fh
  7752. ----------215E04-----------------------------
  7753. INT 21 - DOS 3.1+ network - SET PRINTER MODE
  7754.     AX = 5E04h
  7755.     BX = redirection list index (see AX=5F02h)
  7756.     DX = mode
  7757.         bit 0: set if binary, clear if text (tabs expanded to blanks)
  7758. Return: CF set on error
  7759.         AX = error code (see AH=59h)
  7760.     CF clear if successful
  7761. Note:    calls INT 2F/AX=111Fh with 5E04h on stack
  7762. SeeAlso: AX=5E05h,INT 2F/AX=111Fh
  7763. ----------215E05-----------------------------
  7764. INT 21 - DOS 3.1+ network - GET PRINTER MODE
  7765.     AX = 5E05h
  7766.     BX = redirection list index (see AX=5F02h)
  7767. Return: CF set on error
  7768.         AX = error code (see AH=59h)
  7769.     CF clear if successful
  7770.         DX = printer mode (see AX=5E04h)
  7771. Note:    calls INT 2F/AX=111Fh with 5E05h on stack
  7772. SeeAlso: AX=5E04h,INT 2F/AX=111Fh
  7773. ----------215F00-----------------------------
  7774. INT 21 - DOS 3.1+ network - GET REDIRECTION MODE
  7775.     AX = 5F00h
  7776.     BL = redirection type
  7777.         03h printer
  7778.         04h disk drive
  7779. Return: CF set on error
  7780.         AX = error code (see AH=59h)
  7781.     CF clear if successful
  7782.         BH = redirection state
  7783.         00h off
  7784.         01h on
  7785. Note:    calls INT 2F/AX=111Eh with AX on top of the stack
  7786. SeeAlso: AX=5F01h,INT 2F/AX=111Eh
  7787. ----------215F01-----------------------------
  7788. INT 21 - DOS 3.1+ network - SET REDIRECTION MODE
  7789.     AX = 5F01h
  7790.     BL = redirection type
  7791.         03h printer
  7792.         04h disk drive
  7793.     BH = redirection state
  7794.         00h off
  7795.         01h on
  7796. Return: CF set on error
  7797.         AX = error code (see AH=59h)
  7798.     CF clear if successful
  7799. Notes:    when redirection is off, the local device (if any) rather than the
  7800.       remote device is used
  7801.     calls INT 2F/AX=111Eh with AX on top of the stack
  7802. SeeAlso: AX=5F00h,INT 2F/AX=111Eh
  7803. ----------215F02-----------------------------
  7804. INT 21 - DOS 3.1+ network, Banyan VINES, PC-NFS - GET REDIRECTION LIST ENTRY
  7805.     AX = 5F02h
  7806.     BX = redirection list index
  7807.     CX = 0000h (LANtastic)
  7808.     DS:SI -> 16-byte buffer for ASCIZ device name
  7809.     ES:DI -> 128-byte buffer for ASCIZ network name
  7810. Return: CF clear if successful
  7811.         BH = device status
  7812.         00h valid
  7813.         01h invalid
  7814.         BL = device type
  7815.         03h printer
  7816.         04h disk drive
  7817.         CX = user data previously set with AX=5F03h
  7818.         DS:SI and ES:DI buffers filled
  7819.         DX,BP destroyed
  7820.     CF set on error
  7821.         AX = error code (01h,12h) (see AH=59h)
  7822. Notes:    this function is passed through to INT 2F/AX=111Eh
  7823.     error code 12h is returned if BX is greater than the size of the list
  7824.     also supported by Banyan VINES, PC-NFS, and LANtastic
  7825. SeeAlso: AX=5F03h,INT 2F/AX=111Eh
  7826. ----------215F03-----------------------------
  7827. INT 21 - DOS 3.1+ network, Banyan VINES, LANtastic - REDIRECT DEVICE
  7828.     AX = 5F03h
  7829.     BL = device type
  7830.         03h printer
  7831.         04h disk drive
  7832.     CX = user data to save
  7833.         0000h for LANtastic
  7834.     DS:SI -> ASCIZ local device name (16 bytes max)
  7835.     ES:DI -> ASCIZ network name + ASCIZ password (128 bytes max total)
  7836. Return: CF clear if successful
  7837.     CF set on error
  7838.         AX = error code (01h,03h,05h,08h,0Fh,12h) (see AH=59h)
  7839. Notes:    if device type is disk drive, DS:SI must point at either a null string
  7840.       or a string consisting the drive letter followed by a colon; if a
  7841.       null string, the network attempts to access the destination without
  7842.       redirecting a local drive
  7843.     calls INT 2F/AX=111Eh with AX on top of the stack
  7844. SeeAlso: AX=5F02h,AX=5F04h,INT 2F/AX=111Eh
  7845. ----------215F04-----------------------------
  7846. INT 21 - DOS 3.1+ network, Banyan VINES, LANtastic - CANCEL REDIRECTION
  7847.     AX = 5F04h
  7848.     DS:SI -> ASCIZ device name or path
  7849. Return: CF clear if successful
  7850.     CF set on error
  7851.         AX = error code (01h,03h,05h,08h,0Fh,12h) (see AH=59h)
  7852. Notes:    the DS:SI string must be either a local device name, a drive letter
  7853.       followed by a colon, or a network directory beginning with two
  7854.       backslashes
  7855.     calls INT 2F/AX=111Eh with AX on top of the stack
  7856. SeeAlso: AX=5F03h,INT 2F/AX=111Eh
  7857. ----------215F05-----------------------------
  7858. INT 21 - DOS 4.x + Microsoft Networks - GET REDIRECTION LIST EXTENDED ENTRY
  7859.     AX = 5F05h
  7860.     BX = redirection list index
  7861.     DS:SI -> buffer for ASCIZ source device name
  7862.     ES:DI -> buffer for destination ASCIZ network path
  7863. Return: CF set on error
  7864.         AX = error code (see AH=59h)
  7865.     CF clear if successful
  7866.         BH = device status flag (bit 0 clear if valid)
  7867.         BL = device type (03h if printer, 04h if drive)
  7868.         CX = stored parameter value (user data)
  7869.         BP = NETBIOS local session number
  7870.         DS:SI buffer filled
  7871.         ES:DI buffer filled
  7872. Notes:    the local session number allows sharing the redirector's session number
  7873.     if an error is caused on the NETBIOS LSN, the redirector may be unable
  7874.       to correctly recover from errors
  7875.     calls INT 2F/AX=111Eh with AX on top of the stack
  7876. SeeAlso: AX=5F06h"Network",INT 2F/AX=111Eh
  7877. ----------215F05-----------------------------
  7878. INT 21 - STARLITE architecture - MAP LOCAL DRIVE LETTER TO REMOTE FILE SYSTEM
  7879.     AX = 5F05h
  7880.     DL = drive number (0=A:)
  7881.     DS:SI -> ASCIZ name of the object to map the drive to
  7882. Return: CF set on error
  7883.         AX = error code (see AH=59h)
  7884.     CF clear if successful
  7885. SeeAlso: AX=5F06h"STARLITE"
  7886. ----------215F06-----------------------------
  7887. INT 21 U - Network - GET REDIRECTION LIST???
  7888.     AX = 5F06h
  7889.     ???
  7890. Return: ???
  7891. Notes:    appears to be similar to AX=5F02h and AX=5F05h
  7892.     calls INT 2F/AX=111Eh with AX on top of the stack
  7893. SeeAlso: AX=5F05h"DOS",INT 2F/AX=111Eh
  7894. ----------215F06-----------------------------
  7895. INT 21 - STARLITE architecture - UNMAP DRIVE LETTER
  7896.     AX = 5F06h
  7897.     DL = drive to be unmapped (0=A:)
  7898. Return: CF set on error
  7899.         AX = error code (see AH=59h)
  7900.     CF clear if successful
  7901. SeeAlso: AX=5F05h"STARLITE"
  7902. ----------215F07-----------------------------
  7903. INT 21 - DOS 5.0 - ENABLE DRIVE
  7904.     AX = 5F07h
  7905.     DL = drive number (0=A:)
  7906. Return: CF clear if successful
  7907.     CF set on error
  7908.         AX = error code (0Fh) (see AH=59h)
  7909. Note:    simply sets the "valid" bit in the drive's CDS
  7910. SeeAlso: AH=52h,AX=5F08h"DOS"
  7911. ----------215F07-----------------------------
  7912. INT 21 - STARLITE architecture - MAKE NAMED OBJECT AVAILABLE ON NETWORK
  7913.     AX = 5F07h
  7914.     DS:SI -> ASCIZ name of object to offer to network
  7915.     ES:DI -> ASCIZ name under which object will be known on the network
  7916.         MUST begin with three slashes
  7917. Return: CF set on error
  7918.         AX = error code (see AH=59h)
  7919.     CF clear if successful
  7920. SeeAlso: AX=5F08h"STARLITE"
  7921. ----------215F08-----------------------------
  7922. INT 21 - DOS 5.0 - DISABLE DRIVE
  7923.     AX = 5F08h
  7924.     DL = drive number (0=A:)
  7925. Return: CF clear if successful
  7926.     CF set on error
  7927.         AX = error code (0Fh) (see AH=59h)
  7928. Note:    simply clears the "valid" bit in the drive's CDS
  7929. SeeAlso: AH=52h,AX=5F07h"DOS"
  7930. ----------215F08-----------------------------
  7931. INT 21 - STARLITE architecture - REMOVE GLOBAL NETWORK NAME OF OBJECT
  7932.     AX = 5F08h
  7933.     DS:SI -> ASCIZ network name (not local name) of object to unshare
  7934. Return: CF set on error
  7935.         AX = error code (see AH=59h)
  7936.     CF clear if successful
  7937. SeeAlso: AX=5F07h"STARLITE"
  7938. ----------215F09-----------------------------
  7939. INT 21 - STARLITE architecture - BIND TO NETWORK DEVICE
  7940.     AX = 5F09h
  7941.     DS:DX -> ASCIZ name of the device driver to attach to
  7942. Return: CF set on error
  7943.         AX = error code (see AH=59h)
  7944.     CF clear if successful
  7945. Note:    the STARLITE distributed file system can attach to multiple networks
  7946.       simultaneously
  7947. SeeAlso: AX=5F0Ah
  7948. ----------215F0A-----------------------------
  7949. INT 21 - STARLITE architecture - DETACH FROM NETWORK DEVICE
  7950.     AX = 5F0Ah
  7951.     DS:DX -> ASCIZ name of device driver to detach from
  7952. Return: CF set on error
  7953.         AX = error code (see AH=59h)
  7954.     CF clear if successful
  7955. SeeAlso: AX=5F09h
  7956. ----------215F32-----------------------------
  7957. INT 21 - LAN Manager Enhanced DOS API local interface - DosQNmPipeInfo
  7958.     AX = 5F32h
  7959.     ???
  7960. Return: ???
  7961. Note:    supported by Novell DOS Named Pipe Extender
  7962. SeeAlso: AX=5F33h,AX=5F34h
  7963. ----------215F33-----------------------------
  7964. INT 21 - LAN Manager Enhanced DOS API local interface - DosQNmPHandState
  7965.     AX = 5F33h
  7966.     ???
  7967. Return: ???
  7968. Note:    supported by Novell DOS Named Pipe Extender
  7969. SeeAlso: AX=5F32h,AX=5F34h
  7970. ----------215F34-----------------------------
  7971. INT 21 - LAN Manager Enhanced DOS API local interface - DosSetNmPHandState
  7972.     AX = 5F34h
  7973.     ???
  7974. Return: ???
  7975. Note:    supported by Novell DOS Named Pipe Extender
  7976. SeeAlso: AX=5F32h,AX=5F33h,AX=5F36h
  7977. ----------215F35-----------------------------
  7978. INT 21 - LAN Manager Enhanced DOS API local interface - DosPeekNmPipe
  7979.     AX = 5F35h
  7980.     ???
  7981. Note:    supported by Novell DOS Named Pipe Extender
  7982. Return: ???
  7983. SeeAlso: AX=5F38h,AX=5F39h,AX=5F51h
  7984. ----------215F36-----------------------------
  7985. INT 21 - LAN Manager Enhanced DOS API local interface - DosTransactNmPipe
  7986.     AX = 5F36h
  7987.     ???
  7988. Return: ???
  7989. Note:    supported by Novell DOS Named Pipe Extender
  7990. SeeAlso: AX=5F34h,AX=5F37h
  7991. ----------215F37-----------------------------
  7992. INT 21 - LAN Manager Enhanced DOS API local interface - DosCallNmPipe
  7993.     AX = 5F37h
  7994.     ???
  7995. Return: ???
  7996. Note:    supported by Novell DOS Named Pipe Extender
  7997. SeeAlso: AX=5F36h,AX=5F38h
  7998. ----------215F38-----------------------------
  7999. INT 21 - LAN Manager Enhanced DOS API local interface - DosWaitNmPipe
  8000.     AX = 5F38h
  8001.     ???
  8002. Return: ???
  8003. Note:    supported by Novell DOS Named Pipe Extender
  8004. SeeAlso: AX=5F37h,AX=5F39h
  8005. ----------215F39-----------------------------
  8006. INT 21 - LAN Manager Enhanced DOS API local interface - DosRawReadNmPipe
  8007.     AX = 5F39h
  8008.     ???
  8009. Return: ???
  8010. Note:    supported by Novell DOS Named Pipe Extender
  8011. SeeAlso: AX=5F35h,AX=5F3Ah,INT 2F/AX=1186h
  8012. ----------215F3A-----------------------------
  8013. INT 21 - LAN Manager Enhanced DOS API local interface - DosRawWriteNmPipe
  8014.     AX = 5F3Ah
  8015.     ???
  8016. Return: ???
  8017. Note:    supported by Novell DOS Named Pipe Extender
  8018. SeeAlso: AX=5F3Bh,INT 2F/AX=118Fh
  8019. ----------215F3B-----------------------------
  8020. INT 21 - LAN Manager Enhanced DOS API local interface - NetHandleSetInfo
  8021.     AX = 5F3Bh
  8022.     ???
  8023. Return: ???
  8024. SeeAlso: AX=5F3Ch
  8025. ----------215F3C-----------------------------
  8026. INT 21 - LAN Manager Enhanced DOS API local interface - NetHandleGetInfo
  8027.     AX = 5F3Ch
  8028.     ???
  8029. Return: ???
  8030. SeeAlso: AX=5F3Bh
  8031. ----------215F40-----------------------------
  8032. INT 21 - LAN Manager Enhanced DOS API local interface - NetMessageBufferSend
  8033.     AX = 5F40h
  8034.     ???
  8035. Return: ???
  8036. ----------215F42-----------------------------
  8037. INT 21 - LAN Manager Enhanced DOS API local interface - NetServiceControl
  8038.     AX = 5F42h
  8039.     ???
  8040. Return: ???
  8041. ----------215F44-----------------------------
  8042. INT 21 - LAN Manager Enhanced DOS API local interface - NetWkstaGetInfo
  8043.     AX = 5F44h
  8044.     ???
  8045. Return: ???
  8046. SeeAlso: AX=5F45h,AX=5F49h
  8047. ----------215F45-----------------------------
  8048. INT 21 - LAN Manager Enhanced DOS API local interface - NetWkstaSetInfo
  8049.     AX = 5F45h
  8050.     ???
  8051. Return: ???
  8052. SeeAlso: AX=5F44h
  8053. ----------215F46-----------------------------
  8054. INT 21 - LAN Manager Enhanced DOS API local interface - NetUseEnum
  8055.     AX = 5F46h
  8056.     ???
  8057. Return: ???
  8058. SeeAlso: AX=5F47h,AX=5F48h,AX=5F4Ch
  8059. ----------215F47-----------------------------
  8060. INT 21 - LAN Manager Enhanced DOS API local interface - NetUseAdd
  8061.     AX = 5F47h
  8062.     ???
  8063. Return: ???
  8064. SeeAlso: AX=5F46h,AX=5F48h
  8065. ----------215F48-----------------------------
  8066. INT 21 - LAN Manager Enhanced DOS API local interface - NetUseDel
  8067.     AX = 5F48h
  8068.     ???
  8069. Return: ???
  8070. SeeAlso: AX=5F46h,AX=5F48h,AX=5F49h
  8071. ----------215F49-----------------------------
  8072. INT 21 - LAN Manager Enhanced DOS API local interface - NetUseGetInfo
  8073.     AX = 5F49h
  8074.     ???
  8075. Return: ???
  8076. SeeAlso: AX=5F44h,AX=5F47h
  8077. ----------215F4A-----------------------------
  8078. INT 21 - LAN Manager Enhanced DOS API local interface - NetRemoteCopy
  8079.     AX = 5F4Ah
  8080.     ???
  8081. Return: ???
  8082. SeeAlso: AX=5F4Bh
  8083. ----------215F4B-----------------------------
  8084. INT 21 - LAN Manager Enhanced DOS API local interface - NetRemoteMove
  8085.     AX = 5F4Bh
  8086.     ???
  8087. Return: ???
  8088. SeeAlso: AX=5F4Ah
  8089. ----------215F4C-----------------------------
  8090. INT 21 - LAN Manager Enhanced DOS API local interface - NetServerEnum
  8091.     AX = 5F4Ch
  8092.     ???
  8093. Return: ???
  8094. Note:    supported by Novell DOS Named Pipe Extender
  8095. SeeAlso: AX=5F53h
  8096. ----------215F4D-----------------------------
  8097. INT 21 - LAN Manager Enhanced DOS API local interface - DosMakeMailslot
  8098.     AX = 5F4Dh
  8099.     ???
  8100. Return: ???
  8101. SeeAlso: AX=5F4Eh,AX=5F4Fh,AX=5F50h,AX=5F51h
  8102. ----------215F4E-----------------------------
  8103. INT 21 - LAN Manager Enhanced DOS API local interface - DosDeleteMailslot
  8104.     AX = 5F4Eh
  8105.     ???
  8106. Return: ???
  8107. SeeAlso: AX=5F4Dh,AX=5F4Fh
  8108. ----------215F4F-----------------------------
  8109. INT 21 - LAN Manager Enhanced DOS API local interface - DosMailslotInfo
  8110.     AX = 5F4Fh
  8111.     ???
  8112. Return: ???
  8113. SeeAlso: AX=5F4Dh,AX=5F4Eh,AX=5F50h
  8114. ----------215F50-----------------------------
  8115. INT 21 - LAN Manager Enhanced DOS API local interface - DosReadMailslot
  8116.     AX = 5F50h
  8117.     ???
  8118. Return: ???
  8119. SeeAlso: AX=5F4Dh,AX=5F4Fh,AX=5F51h,AX=5F52h
  8120. ----------215F51-----------------------------
  8121. INT 21 - LAN Manager Enhanced DOS API local interface - DosPeekMailslot
  8122.     AX = 5F51h
  8123.     ???
  8124. Return: ???
  8125. SeeAlso: AX=5F35h,AX=5F4Fh,AX=5F50h,AX=5F52h
  8126. ----------215F52-----------------------------
  8127. INT 21 - LAN Manager Enhanced DOS API local interface - DosWriteMailslot
  8128.     AX = 5F52h
  8129.     ???
  8130. Return: ???
  8131. SeeAlso: AX=5F4Fh,AX=5F50h,AX=5F51h
  8132. ----------215F53-----------------------------
  8133. INT 21 - LAN Manager Enhanced DOS API local interface - NetServerEnum2
  8134.     AX = 5F53h
  8135.     ???
  8136. Return: ???
  8137. SeeAlso: AX=5F4Ch
  8138. ----------215F80-----------------------------
  8139. INT 21 - LANtastic - GET LOGIN ENTRY
  8140.     AX = 5F80h
  8141.     BX = login entry index (0-based)
  8142.     ES:DI -> 16-byte buffer for machine name
  8143. Return: CF clear if successful
  8144.         buffer filled with machine name ("\\" prefix removed)
  8145.         DL = adapter number (v3+)
  8146.     CF set on error
  8147.         AX = error code
  8148. Note:    the login entry index corresponds to the value BX used in AX=5F83h
  8149. SeeAlso: AX=5F83h
  8150. ----------215F81-----------------------------
  8151. INT 21 - LANtastic - LOGIN TO SERVER
  8152.     AX = 5F81h
  8153.     ES:DI -> ASCIZ login path followed immediately by ASCIZ password
  8154.     BL = adapter number
  8155.         FFh try all valid adapters
  8156.         00h-07h try only specified adapter
  8157. Return: CF clear if successful
  8158.     CF set on error
  8159.         AX = error code
  8160. Notes:    login path is of form "\\machine\username"
  8161.     if no password is used, the string at ES:DI must be terminated with
  8162.       three NULs for compatibility with LANtastic v3.0.
  8163. SeeAlso: AX=5F82h,AX=5F84h
  8164. ----------215F82-----------------------------
  8165. INT 21 - LANtastic - LOGOUT FROM SERVER
  8166.     AX = 5F82h
  8167.     ES:DI -> ASCIZ server name (in form "\\machine")
  8168. Return: CF clear if successful
  8169.     CF set on error
  8170.         AX = error code
  8171. SeeAlso: AX=5F81h,AX=5F88h,AX=5FCBh
  8172. ----------215F83-----------------------------
  8173. INT 21 - LANtastic - GET USERNAME ENTRY
  8174.     AX = 5F83h
  8175.     BX = login entry index (0-based)
  8176.     ES:DI -> 16-byte buffer for username currently logged into
  8177. Return: CF clear if successful
  8178.         DL = adapter number (v3+)
  8179.     CF set on error
  8180.         AX = error code
  8181. Note:    the login entry index corresponds to the value BX used in AX=5F80h
  8182. SeeAlso: AX=5F80h
  8183. ----------215F84-----------------------------
  8184. INT 21 - LANtastic - GET INACTIVE SERVER ENTRY
  8185.     AX = 5F84h
  8186.     BX = server index not currently logged into
  8187.     ES:DI -> 16-byte buffer for server name which is available for logging
  8188.         in to ("\\" prefix omitted)
  8189. Return: CF clear if successful
  8190.         DL = adapter number to non-logged in server is on
  8191.     CF set on error
  8192.         AX = error code
  8193. SeeAlso: AX=5F81h
  8194. ----------215F85-----------------------------
  8195. INT 21 - LANtastic - CHANGE PASSWORD
  8196.     AX = 5F85h
  8197.     ES:DI -> buffer containing "\\machine\oldpassword" 00h "newpassword"00h
  8198. Return: CF clear if successful
  8199.     CF set on error
  8200.         AX = error code
  8201. Notes:    must be logged into the named machine
  8202.     this function is illegal for group accounts
  8203. ----------215F86-----------------------------
  8204. INT 21 - LANtastic - DISABLE ACCOUNT
  8205.     AX = 5F86h
  8206.     ES:DI -> ASCIZ machine name and password in form "\\machine\password"
  8207. Return: CF clear if successful
  8208.     CF set on error
  8209.         AX = error code
  8210. Note:    must be logged into the named machine and concurrent logins set to 1
  8211.       by NET_MGR.  Requires system manager to re-enable account.
  8212. ----------215F87-----------------------------
  8213. INT 21 - LANtastic v3+ - GET ACCOUNT
  8214.     AX = 5F87h
  8215.     DS:SI -> 128-byte buffer for account information (see below)
  8216.     ES:DI -> ASCIZ machine name in form "\\machine"
  8217. Return:    CF clear if successful
  8218.     CF set on error
  8219.         AX = error code
  8220.     BX destroyed
  8221. Note:    must be logged into the specified machine
  8222.  
  8223. Format of user account structure:
  8224. Offset    Size    Description
  8225.  00h 16 BYTEs    blank-padded username (zero-padded for v4.x)
  8226.  10h 16 BYTEs    reserved (00h)
  8227.  20h 32 BYTEs    user description
  8228.  40h    BYTE    privilege bits
  8229.         bit 7: bypass access control lists
  8230.             6: bypass queue protection
  8231.             5: treat as local process
  8232.             4: bypass mail protection
  8233.             3: allow audit entry creation
  8234.             2: system manager
  8235.             0: user cannot change password
  8236.  41h    BYTE    maximum concurrent users
  8237.  42h 42 BYTEs    bit map for disallowed half hours, beginning on Sunday
  8238.         (bit set if half-hour not an allowed time)
  8239.  6Ch    WORD    internal (0002h)
  8240.  6Eh  2 WORDs    last login time
  8241.  72h  2 WORDs    account expiration date (MSDOS-format year/month:day)
  8242.  76h  2 WORDs    password expiration date (0 = none)
  8243.  7Ah    BYTE    number of days to extend password after change (1-31)
  8244.         00h if no extension required
  8245. ---v3.x---
  8246.  7Bh  5 BYTEs    reserved
  8247. ---v4.x---
  8248.  7Bh    BYTE    storage for first letter of user name when deleted (first
  8249.         character is changed to 00h when deleting account)
  8250.  7Ch    BYTE    extended privileges
  8251.  7Dh  3 BYTEs    reserved
  8252. ----------215F88-----------------------------
  8253. INT 21 - LANtastic v4.0+ - LOGOUT FROM ALL SERVERS
  8254.     AX = 5F88h
  8255. Return:    CF clear if successful
  8256.     CF set on error
  8257.         AX = error code
  8258. SeeAlso: AX=5F82h
  8259. ----------215F97-----------------------------
  8260. INT 21 - LANtastic - COPY FILE
  8261.     AX = 5F97h
  8262.     CX:DX = number of bytes to copy (FFFFFFFFh = entire file)
  8263.     SI = source file handle
  8264.     DI = destination file handle
  8265. Return: CF clear if successful
  8266.         DX:AX = number of bytes copied
  8267.     CF set on error
  8268.         AX = error code
  8269. Note:    copy is performed by server
  8270. ----------215F98-----------------------------
  8271. INT 21 - LANtastic - SEND UNSOLICITED MESSAGE
  8272.     AX = 5F98h
  8273.     DS:SI -> message buffer (see below)
  8274. Return: CF clear if successful
  8275.     CF set on error
  8276.         AX = error code
  8277. Note:    v4.1- return no errors
  8278. SeeAlso: AX=5F99h
  8279.  
  8280. Format of message buffer:
  8281. Offset    Size    Description
  8282.  00h    BYTE    reserved
  8283.  01h    BYTE    message type
  8284.         00h general 
  8285.         01h server warning
  8286.         02h-7Fh reserved
  8287.         80h-FFh user-defined
  8288.  02h 16 BYTEs    ASCIZ destination machine name
  8289.  12h 16 BYTEs    ASCIZ server name which user must be logged into
  8290.  22h 16 BYTEs    ASCIZ user name
  8291.  32h 16 BYTEs    ASCIZ originating machine name (filled in when received)
  8292.  42h 80 BYTEs    message text
  8293. ----------215F99-----------------------------
  8294. INT 21 - LANtastic - GET LAST RECEIVED UNSOLICITED MESSAGE
  8295.     AX = 5F99h
  8296.     ES:DI -> messsage buffer (see AX=5F98h for format)
  8297. Return: CF clear if successful
  8298.     CF set on error
  8299.         AX = error code
  8300. SeeAlso: AX=5F98h
  8301. ----------215F9A-----------------------------
  8302. INT 21 - LANtastic - GET MESSAGE PROCESSING FLAGS
  8303.     AX = 5F9Ah
  8304. Return: CF clear if successful
  8305.         DL = bits describing processing for received unsolicited messages
  8306.         bit 0: beep before message is delivered
  8307.             1: deliver message to message service
  8308.             2: pop up message automatically (v3+)
  8309.     CF set on error
  8310.         AX = error code
  8311. SeeAlso: AX=5F9Bh,AX=5F9Ch,AX=5F9Dh
  8312. ----------215F9B-----------------------------
  8313. INT 21 - LANtastic - SET MESSAGE PROCESSING FLAG
  8314.     AX = 5F9Bh
  8315.     DL = bits describing processing for received unsolicited messages
  8316.          (see AX=5F9Ah)
  8317. Return: CF clear if successful
  8318.     CF set on error
  8319.         AX = error code
  8320. SeeAlso: AX=5F9Ah,AX=5F9Eh
  8321. ----------215F9C-----------------------------
  8322. INT 21 - LANtastic v3+ - POP UP LAST RECEIVED MESSAGE
  8323.     AX = 5F9Ch
  8324.     CX = time to leave on screen in clock ticks
  8325.     DH = 0-based screen line on which to place message
  8326. Return:    CF clear if successful
  8327.     CF set on error
  8328.         AX = error code (0Bh)
  8329. Notes:    the original screen contents are restored when the message is removed
  8330.     the message will not appear, and an error will be returned, if the
  8331.       screen is in a graphics mode
  8332. SeeAlso: AX=5F9Ah
  8333. ----------215F9D-----------------------------
  8334. INT 21 - LANtastic v4.1+ - GET REDIRECTOR CONTROL BITS
  8335.     AX = 5F9Dh
  8336. Return:    DL = redirector control bits
  8337.         bit 7: set to notify on print job completion
  8338. SeeAlso: AX=5F9Ah,AX=5F9Eh
  8339. ----------215F9E-----------------------------
  8340. INT 21 - LANtastic v4.1+ - SET REDIRECTOR CONTROL BITS
  8341.     AX = 5F9Eh
  8342.     DL = redirector control bits (see AH = 5F9Dh)
  8343. Return: nothing
  8344. SeeAlso: AX=5F9Bh,AX=5F9Dh
  8345. ----------215FA0-----------------------------
  8346. INT 21 - LANtastic - GET QUEUE ENTRY
  8347.     AX = 5FA0h
  8348.     BX = queue entry index (0000h is first entry)
  8349.     DS:SI -> buffer for queue entry (see below)
  8350.     ES:DI -> ASCIZ server name in form "\\name"
  8351. Return: CF clear if successful
  8352.     CF set on error
  8353.         AX = error code
  8354.     BX = entry index for next queue entry (BX-1 is current index)
  8355. SeeAlso: AX=5FA1h,AX=5FA2h
  8356.  
  8357. Format of queue entry:
  8358. Offset    Size    Description
  8359.  00h    BYTE    status of entry
  8360.         00h empty
  8361.         01h being updated
  8362.         02h being held
  8363.         03h waiting for despool
  8364.         04h being despooled
  8365.         05h canceled
  8366.         06h spooled file could not be accessed
  8367.         07h destination could not be accessed
  8368.         08h rush job
  8369.  01h    DWORD    size of spooled file
  8370.  05h    BYTE    type of entry
  8371.         00h printer queue file
  8372.         01h message
  8373.         02h local file
  8374.         03h remote file
  8375.         04h to remote modem
  8376.         05h batch processor file
  8377.  06h    BYTE    output control
  8378.         bit 6: don't delete (for mail)
  8379.         bit 5: mail file contains voice mail (v3+)
  8380.         bit 4: mail message has been read
  8381.         bit 3: response has been requested for this mail
  8382.  07h    WORD    number of copies
  8383.  09h    DWORD    sequence number of queue entry
  8384.  0Dh 48 BYTEs    pathname of spooled file
  8385.  3Dh 16 BYTEs    user who spooled file
  8386.  4Dh 16 BYTEs    name of machine from which file was spooled
  8387.  5Dh    WORD    date file was spooled (see AX=5700h)
  8388.  5Fh    WORD    time file was spooled (see AX=5700h)
  8389.  61h 17 BYTEs    ASCIZ destination device or user name
  8390.  72h 48 BYTEs    comment field
  8391. ----------215FA1-----------------------------
  8392. INT 21 - LANtastic - SET QUEUE ENTRY
  8393.     AX = 5FA1h
  8394.     BX = handle of opened queue entry
  8395.     DS:SI -> queue entry (see AX=5FA0h)
  8396. Return: CF clear if successful
  8397.     CF set on error
  8398.         AX = error code
  8399. Notes:    the only queue entry fields which may be changed are output control,
  8400.       number of copies, destination device, and comment
  8401.     the handle in BX is that from a create or open (INT 21/AH=3Ch,3Dh)
  8402.       call on the file "\\server\\@MAIL" or "\\server\@name" (for
  8403.       printer queue entries)
  8404. SeeAlso: AX=5FA0h,AX=5FA2h,AX=5FA9h
  8405. ----------215FA2-----------------------------
  8406. INT 21 - LANtastic - CONTROL QUEUE
  8407.     AX = 5FA2h
  8408.     BL = control command
  8409.         00h start despooling (privileged)
  8410.         01h halt despooling (privileged)
  8411.         02h halt despooling at end of job (privileged)
  8412.         03h pause despooler at end of job (privileged)
  8413.         04h print single job (privileged)
  8414.         05h restart current job (privileged)
  8415.         06h cancel the current job
  8416.         07h hold queue entry
  8417.         08h release a held queue entry
  8418.         09h make queue entry a rushed job (privileged)
  8419.     CX:DX = sequence number to control (commands 06h-09h)
  8420.     DX = physical printer number (commands 00h-05h)
  8421.         00h-02h LPT1-LPT3
  8422.         03h,04h COM1,COM2
  8423.         other    all printers
  8424.     ES:DI -> ASCIZ server name in form "\\machine"
  8425. Return: CF clear if successful
  8426.     CF set on error
  8427.         AX = error code
  8428. ----------215FA3-----------------------------
  8429. INT 21 - LANtastic v3+ - GET PRINTER STATUS
  8430.     AX = 5FA3h
  8431.     BX = physical printer number (00h-02h = LPT1-LPT3, 03h-04h = COM1-COM2)
  8432.     DS:SI -> buffer for printer status (see below)
  8433.     ES:DI -> ASCIZ server name in form "\\machine"
  8434. Return: CF clear if successful
  8435.     CF set on error
  8436.         AX = error code
  8437.     BX = next physical printer number
  8438. Note:    you must be logged in to the specified server
  8439.  
  8440. Format of printer status:
  8441. Offset    Size    Description
  8442.  00h    BYTE    printer state
  8443.         bit 7: printer paused
  8444.         bits 0-6: 0 printer disabled
  8445.               1 will stop at end of job
  8446.               2 print multiple jobs
  8447.  01h    WORD    queue index of print job being despooled
  8448.         FFFFh if not despooling--ignore all following fields
  8449.  03h    WORD    actual characters per second being output
  8450.  05h    DWORD    number of characters actually output so far
  8451.  09h    DWORD    number of bytes read from spooled file so far
  8452.  0Dh    WORD    copies remaining to print
  8453. ----------215FA4-----------------------------
  8454. INT 21 - LANtastic v3+ - GET STREAM INFO
  8455.     AX = 5FA4h
  8456.     BX = 0-based stream index number
  8457.     DS:SI -> buffer for stream information (see below)
  8458.     ES:DI -> ASCIZ machine name in form "\\machine"
  8459. Return: CF clear if successful
  8460.     CF set on error
  8461.         AX = error code
  8462.     BX = next stream number
  8463. SeeAlso: AX=5FA5h
  8464.  
  8465. Format of stream information:
  8466. Offset    Size    Description
  8467.  00h    BYTE    queueing of jobs for logical printer (0=disabled,other=enabled)
  8468.  01h 11 BYTEs    logical printer resource template (may contain ? wildcards)
  8469. ----------215FA5-----------------------------
  8470. INT 21 - LANtastic v3+ - SET STREAM INFO
  8471.     AX = 5FA5h
  8472.     BX = 0-based stream index number
  8473.     DS:SI -> buffer containing stream information (see AX=5FA4h)
  8474.     ES:DI -> ASCIZ machine name in form "\\machine"
  8475. Return: CF clear if successful
  8476.     CF set on error
  8477.         AX = error code
  8478. SeeAlso: AX=5FA4h
  8479. ----------215FA7-----------------------------
  8480. INT 21 - LANtastic - CREATE USER AUDIT ENTRY
  8481.     AX = 5FA7h
  8482.     DS:DX -> ASCIZ reason code (max 8 bytes)
  8483.     DS:SI -> ASCIZ variable reason string (max 128 bytes)
  8484.     ES:DI -> ASCIZ machine name in form "\\machine"
  8485. Return: CF clear if successful
  8486.     CF set on error
  8487.         AX = error code
  8488. Note:    you must be logged in to the specified server and have the "U"
  8489.       privilege to execute this call
  8490. ----------215FA9-----------------------------
  8491. INT 21 - LANtastic v4.1+ - SET EXTENDED QUEUE ENTRY
  8492.     AX = 5FA9h
  8493.     BX = handle of opened queue entry
  8494.     DS:SI -> queue entry (see AX=5FA0h)
  8495. Return: CF clear if successful
  8496.     CF set on error
  8497.         AX = error code
  8498. Note:    functions exactly the same as AX=5FA1h except the spooled filename is
  8499.       also set.  This call supports    direct despooling.
  8500. SeeAlso: AX=5FA1h
  8501. ----------215FB0-----------------------------
  8502. INT 21 - LANtastic - GET ACTIVE USER INFORMATION
  8503.     AX = 5FB0h
  8504.     BX = server login entry index
  8505.     DS:SI -> buffer for active user entry (see below)
  8506.     ES:DI -> ASCIZ machine name in form "\\server"
  8507. Return: CF clear if successful
  8508.     CF set on error
  8509.         AX = error code
  8510.     BX = next login index
  8511.  
  8512. Format of active user entry:
  8513. Offset    Size    Description
  8514.  00h    WORD    virtual circuit number
  8515.  02h    BYTE    login state
  8516.         bit 0: fully logged in
  8517.             1: remote program load login
  8518.             2: user has system manager privileges
  8519.             3: user can create audit entries
  8520.             4: bypass mail protection
  8521.             5: treat as local process
  8522.             6: bypass queue protection
  8523.             7: bypass access control lists
  8524.  03h    BYTE    last command issued (see below)
  8525.  04h  5 BYTEs    number of I/O bytes (40-bit unsigned number)
  8526.  09h  3 BYTEs    number of server requests (24-bit unsigned)
  8527.  0Ch 16 BYTEs    name of user who is logged in
  8528.  1Ch 16 BYTEs    name of remote logged in machine
  8529.  2Ch    BYTE    extended privileges (v4+???)
  8530.         bit 0: user cannot change his password
  8531.  2Dh    WORD    time left in minutes (0000h = unlimited) (v4+???)
  8532.  
  8533. Values for last command:
  8534.  00h    login
  8535.  01h    process termination
  8536.  02h    open file
  8537.  03h    close file
  8538.  04h    create file
  8539.  05h    create new file
  8540.  06h    create unique file
  8541.  07h    commit data to disk
  8542.  08h    read file
  8543.  09h    write file
  8544.  0Ah    delete file
  8545.  0Bh    set file attributes
  8546.  0Ch    lock byte range
  8547.  0Dh    unlock byte range
  8548.  0Eh    create subdirectory
  8549.  0Fh    remove subdirectory
  8550.  10h    rename file
  8551.  11h    find first matching file
  8552.  12h    find next matching file
  8553.  13h    get disk free space
  8554.  14h    get a queue entry
  8555.  15h    set a queue entry
  8556.  16h    control the queue
  8557.  17h    return login information
  8558.  18h    return link description
  8559.  19h    seek on file
  8560.  1Ah    get server's time
  8561.  1Bh    create audit entry
  8562.  1Ch    open file in multitude of modes
  8563.  1Dh    change password
  8564.  1Eh    disable account
  8565.  1Fh    local server file copy
  8566. ---v3+---
  8567.  20h    get username from account file
  8568.  21h    translate server's logical path
  8569.  22h    make indirect file
  8570.  23h    get indirect file contents
  8571.  24h    get physical printer status
  8572.  25h    get logical print stream info
  8573.  26h    set logical print stream info
  8574.  27h    get user's account record
  8575. ---v4+---
  8576.  28h    request server shutdown
  8577.  29h    cancel server shutdown
  8578.  2Ah    stuff server's keyboard
  8579.  2Bh    write then commit data to disk
  8580.  2Ch    set extended queue entry
  8581.  2Dh    terminate user from server
  8582.  2Eh    enable/disable logins
  8583.  2Fh    flush server caches
  8584.  30h    change username
  8585.  31h    get extended queue entry
  8586.     (same as get queue, but can return named fields blanked)
  8587. ----------215FB1-----------------------------
  8588. INT 21 - LANtastic - GET SHARED DIRECTORY INFORMATION
  8589.     AX = 5FB1h
  8590.     DS:SI -> 64-byte buffer for link description
  8591.     ES:DI -> ASCIZ machine and shared directory name in form
  8592.          "\\machine\shared-resource"
  8593. Return: CF clear if successful
  8594.         CX = access control list privilege bits for requesting user
  8595.         bit 4: (I) allow expansion of indirect files
  8596.             5: (A) allow attribute changing
  8597.             6: (P) allow physical access to device
  8598.             7: (E) allow program execution
  8599.             8: (N) allow file renaming
  8600.             9: (K) allow directory deletion
  8601.            10: (D) allow file deletion
  8602.            11: (L) allow file/directory lookups
  8603.            12: (M) allow directory creation
  8604.            13: (C) allow file creation
  8605.            14: (W) allow open for write and writing
  8606.            15: (R) allow open for read and reading
  8607.     CF set on error
  8608.         AX = error code
  8609. ----------215FB2-----------------------------
  8610. INT 21 - LANtastic v3+ - GET USERNAME FROM ACCOUNT FILE
  8611.     AX = 5FB2h
  8612.     BX = username entry index (0 for first)
  8613.     DS:SI -> 16-byte buffer for username
  8614.     ES:DI -> ASCIZ server name in form "\\machine"
  8615. Return: CF clear if successful
  8616.     CF set on error
  8617.         AX = error code
  8618.     BX = next queue entry index
  8619. ----------215FB3-----------------------------
  8620. INT 21 - LANtastic v3+ - TRANSLATE PATH
  8621.     AX = 5FB3h
  8622.     DS:SI -> 128-byte buffer for ASCIZ result
  8623.     ES:DI -> full ASCIZ path, including server name
  8624.     DX = types of translation to be performed
  8625.         bit 0: expand last component as indirect file
  8626.         1: return actual path relative to server's physical disk
  8627. Return: CF clear if successful
  8628.     CF set on error
  8629.         AX = error code
  8630. Note:    always expands any indirect files along the path
  8631. SeeALso: AX=5FB4h
  8632. ----------215FB4-----------------------------
  8633. INT 21 - LANtastic v3+ - CREATE INDIRECT FILE
  8634.     AX = 5FB4h
  8635.     DS:SI -> 128-byte buffer containing ASCIZ contents of indirect file
  8636.     ES:DI -> full ASCIZ path of indirect file to create, incl machine name
  8637. Return: CF clear if successful
  8638.     CF set on error
  8639.         AX = error code
  8640. Note:    the contents of the indirect file may be any valid server-relative path
  8641. ----------215FB5-----------------------------
  8642. INT 21 - LANtastic v3+ - GET INDIRECT FILE CONTENTS
  8643.     AX = 5FB5h
  8644.     DS:SI -> 128-byte buffer for ASCIZ indirect file contents
  8645.     ES:DI -> full ASCIZ path of indirect file
  8646. Return: CF clear if successful
  8647.     CF set on error
  8648.         AX = error code
  8649. ----------215FB6-----------------------------
  8650. INT 21 - LANtastic v4.1+ - SET AUTO-LOGIN DEFAULTS
  8651.     AX = 5FB6h
  8652.     ES:DI -> pointer to ASCIZ default user name, immediately followed by
  8653.         ASCIZ password
  8654.     BL = adapter number to use for default login attempt
  8655.         FFh try all valid adapters
  8656.         00h-05h try adapter 0-5 explicitly
  8657. Return: CF clear if successful
  8658.     CF set on error
  8659.         AX = error code
  8660. Notes:    call with ES:DI -> two nulls to disable auto-login
  8661. SeeAlso: AX=5FB7h
  8662. ----------215FB7-----------------------------
  8663. INT 21 - LANtastic v4.1+ - GET AUTO-LOGIN DEFAULTS
  8664.     AX = 5FB7h
  8665.     ES:DI -> pointer to 16-byte buffer to store ASCIZ auto-login user name
  8666. Return: CF clear if successful
  8667.         DL = adapter number used for default login attempt
  8668.         FFh all valid adapters will be tried
  8669.         00h-05h specified adapter will be tried explicitly
  8670.     CF set on error
  8671.         AX = error code
  8672. SeeAlso: AX=5F81h,AX=5FB6h
  8673. ----------215FC0-----------------------------
  8674. INT 21 - LANtastic - GET TIME FROM SERVER
  8675.     AX = 5FC0h
  8676.     DS:SI -> time block (see below)
  8677.     ES:DI -> ASCIZ server name to get time from
  8678. Return: CF clear if successful
  8679.     CF set on error
  8680.         AX = error code
  8681.  
  8682. Format of time block:
  8683. Offset    Size    Description
  8684.  00h    WORD    year
  8685.  02h    BYTE    day
  8686.  03h    BYTE    month
  8687.  04h    BYTE    minutes
  8688.  05h    BYTE    hour
  8689.  06h    BYTE    hundredths of second
  8690.  07h    BYTE    second
  8691. ----------215FC8-----------------------------
  8692. INT 21 - LANtastic v4.0+ - SCHEDULE SERVER SHUTDOWN
  8693.     AX = 5FC8h
  8694.     ES:DI -> ASCIZ server name in form "\\machine"
  8695.     DS:SI -> ASCIZ reason string (80 characters)
  8696.     CX = number of minutes until shutdown (0 = immediate)
  8697.     DX = option flags (see below)
  8698.         bit 0: auto reboot
  8699.         1: do not notify users
  8700.         2: halt after shutdown
  8701.         3: shutdown due to power fail (used by UPS)
  8702.         bits 4-7: reserved
  8703.         bits 8-14: user definable
  8704.         bit 15: reserved
  8705. Return: CF clear if successful
  8706.     CF set on error
  8707.         AX = error code
  8708. SeeAlso: AH=5FC9h
  8709. ----------215FC9-----------------------------
  8710. INT 21 - LANtastic v4.0+ - CANCEL SERVER SHUTDOWN
  8711.     AX = 5FC9h
  8712.     ES:DI -> ASCIZ server name in form "\\machine"
  8713. Return: CF clear if successful
  8714.     CF set on error
  8715.         AX = error code
  8716. Note:    you must have the "S" privilege to use this call
  8717. SeeAlso: AH=5FC8h
  8718. ----------215FCA-----------------------------
  8719. INT 21 - LANtastic v4.0+ - STUFF SERVER KEYBOARD BUFFER
  8720.     AX = 5FCAh
  8721.     ES:DI -> ASCIZ server name in form "\\machine"
  8722.     DS:SI -> ASCIZ string to stuff (128 bytes)
  8723. Return: CF clear if successful
  8724.     CF set on error
  8725.         AX = error code
  8726. Note:    you must have the "S" privilege to use this call
  8727.     maximum number of characters that can be stuffed is determined by the
  8728.       server's RUN BUFFER SIZE.
  8729. ----------215FCB-----------------------------
  8730. INT 21 - LANtastic v4.1+ - TERMINATE USER
  8731.     AX = 5FCBh
  8732.     ES:DI -> ASCIZ server name in form "\\machine"
  8733.     DS:SI -> blank-padded username.     A null char = wildcard.
  8734.     DS:DX -> blank-padded machine name.  A null char = wildcard.
  8735.     CX = minutes until termination (0 = immediate)
  8736. Return: CF clear if successful
  8737.     CF set on error
  8738.         AX = error code
  8739. Note:    you must have the "S" privilege to use this call
  8740.     you cannot log yourself out using this call
  8741. SeeAlso: AX=5F82h
  8742. ----------215FCC-----------------------------
  8743. INT 21 - LANtastic v4.1+ - GET/SET SERVER CONTROL BITS
  8744.     AX = 5FCCh
  8745.     ES:DI -> ASCIZ server name in form "\\machine"
  8746.     CX = bit values (value of bits you want to set)     See below.
  8747.     DX = bit mask (bits you are interested in, 0 = get only)  See 
  8748. below.
  8749. Return: CF clear if successful
  8750.         CX = control bits after call
  8751.         bit 0: disable logins
  8752.     CF set on error
  8753.         AX = error code
  8754. Note:    you must have the "S" privilege to SET, anyone can GET.
  8755. ----------215FCD-----------------------------
  8756. INT 21 - LANtastic v4.1+ - FLUSH SERVER CACHES
  8757.     AX = 5FCDh
  8758.     ES:DI -> ASCIZ server name in form "\\machine"
  8759. Return: CF clear if successful
  8760.     CF set on error
  8761.         AX = error code
  8762. Note:    you must have the "S" privilege to use this call.
  8763. ----------215FD0-----------------------------
  8764. INT 21 - LANtastic - GET REDIRECTED PRINTER TIMEOUT
  8765.     AX = 5FD0h
  8766. Return: CF clear if successful
  8767.         CX = redirected printer timeout in clock ticks of 55ms
  8768.         0000h if timeout disabled
  8769.     CF set on error
  8770.         AX = error code
  8771. SeeAlso: AX=5FD1h
  8772. ----------215FD1-----------------------------
  8773. INT 21 - LANtastic - SET REDIRECTED PRINTER TIMEOUT
  8774.     AX = 5FD1h
  8775.     CX = printer timeout in clock ticks of 55ms, 0000h to disable timeouts
  8776. Return: CF clear if successful
  8777.     CF set on error
  8778.         AX = error code
  8779. SeeAlso: AX=5FD0h
  8780. ----------215FE0-----------------------------
  8781. INT 21 C - LANtastic - GET DOS SERVICE VECTOR
  8782.     AX = 5FE0h
  8783. Return: CF clear if successful
  8784.         ES:BX -> current FAR service routine
  8785.     CF set on error
  8786.         AX = error code
  8787. Note:    the service routine is called by the LANtastic redirector whenever DOS
  8788.       may safely be called, permitting external TSRs and drivers to hook
  8789.       into LANtastic's DOS busy flag checking
  8790. SeeAlso: AX=5FE1h,INT 28,INT 2A/AH=84h
  8791. ----------215FE1-----------------------------
  8792. INT 21 - LANtastic - SET DOS SERVICE VECTOR
  8793.     AX = 5FE1h
  8794.     ES:BX -> FAR routine to call when DOS services are available
  8795. Return: CF clear if successful
  8796.     CF set on error
  8797.         AX = error code
  8798. Note:    new handler must chain to previous handler as its first action
  8799. SeeAlso: AX=5FE0h
  8800. ----------215FE2-----------------------------
  8801. INT 21 - LANtastic - GET MESSAGE SERVICE VECTOR
  8802.     AX = 5FE2h
  8803. Return: CF clear if successful
  8804.         ES:BX -> current FAR message service routine
  8805.     CF set on error
  8806.         AX = error code
  8807. SeeAlso: AX=5FE3h
  8808. ----------215FE3-----------------------------
  8809. INT 21 - LANtastic - SET MESSAGE SERVICE VECTOR
  8810.     AX = 5FE3h
  8811.     ES:BX -> FAR routine for processing network messages
  8812. Return: CF clear if successful
  8813.     CF set on error
  8814.         AX = error code
  8815. Notes:    handler must chain to previous handler as its first action
  8816.     on invocation, ES:BX -> just-received message
  8817. SeeAlso: AX=5FE2h
  8818. ----------2160-------------------------------
  8819. INT 21 - DOS 3.0+ - CANONICALIZE FILENAME OR PATH
  8820.     AH = 60h
  8821.     DS:SI -> ASCIZ filename or path
  8822.     ES:DI -> 128-byte buffer for canonicalized name
  8823. Return: CF set on error
  8824.         AX = error code
  8825.         02h invalid component in directory path or drive letter only
  8826.         03h malformed path or invalid drive letter
  8827.         ES:DI buffer unchanged
  8828.     CF clear if successful
  8829.         AH = 00h
  8830.         AL = destroyed (00h or 5Ch or last char of current dir on drive)
  8831.         buffer filled with qualified name of form D:\PATH\FILE.EXT or
  8832.           \\MACHINE\PATH\FILE.EXT
  8833. Notes:    the input path need not actually exist
  8834.     letters are uppercased, forward slashes converted to backslashes,
  8835.       asterisks converted to appropriate number of question marks, and
  8836.       file and directory names are truncated to 8.3 if necessary.
  8837.     '.' and '..' in the path are resolved
  8838.     filespecs on local drives always start with "d:", those on network
  8839.       drives always start with "\\"
  8840.     if path string is on a JOINed drive, the returned name is the one that
  8841.       would be needed if the drive were not JOINed; similarly for a
  8842.       SUBSTed, ASSIGNed, or network drive letter.    Because of this, it is
  8843.       possible to get a qualified name that is not legal under the current
  8844.       combination of SUBSTs, ASSIGNs, JOINs, and network redirections
  8845.     under DOS 3.3 through 5.00, a device name is translated differently if
  8846.       the device name does not have an explicit directory or the directory
  8847.       is \DEV (relative directory DEV from the root directory works
  8848.       correctly).  In these cases, the returned string consists of the
  8849.       unchanged device name and extension appended to the string X:/
  8850.       (forward slash instead of backward slash as in all other cases) where
  8851.       X is the default or explicit drive letter.
  8852.     functions which take pathnames require canonical paths if invoked via
  8853.       INT 21/AX=5D00h
  8854.     supported by OS/2 v1.1 compatibility box
  8855.     NetWare 2.1x does not support characters with the high bit set; early
  8856.       versions of NetWare 386 support such characters except in this call.
  8857.       In addition, NetWare returns error code 3 for the path "X:\"; one
  8858.       should use "X:\." instead.
  8859.     for DOS 3.3-5.0, the input and output buffers may be the same, as the
  8860.       canonicalized name is built in an internal buffer and copied to the
  8861.       specified output buffer as the very last step
  8862.     for DR DOS 6.0, this function is not automatically called when on a
  8863.       network.  Device drivers reportedly cannot make this call from their
  8864.       INIT function.  Using the same pointer for both input and output
  8865.       buffers is not supported in the April 1992 and earlier versions of
  8866.       DR DOS
  8867. SeeAlso: INT 2F/AX=1123h,INT 2F/AX=1221h
  8868. ----------2161-------------------------------
  8869. INT 21 - DOS 3+ - UNUSED
  8870.     AH = 61h
  8871. Return: AL = 00h
  8872. Note:    this function does nothing and returns immediately
  8873. ----------2162-------------------------------
  8874. INT 21 - DOS 3+ - GET CURRENT PSP ADDRESS
  8875.     AH = 62h
  8876. Return: BX = segment of PSP for current process
  8877. Notes:    under DOS 3+, this function does not use any of the DOS-internal stacks
  8878.       and may thus be called at any time, even during another INT 21h call
  8879.     the current PSP is not necessarily the caller's PSP
  8880.     identical to the undocumented AH=51h
  8881. SeeAlso: AH=50h,AH=51h
  8882. ----------216300-----------------------------
  8883. INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE ADDRESS
  8884.     AX = 6300h
  8885. Return: CF clear if successful
  8886.         DS:SI -> lead byte table (see below)
  8887.     CF set on error
  8888.         AX = error code (01h) (see AH=59h)
  8889. Notes:    does not preserve any registers other than SS:SP
  8890.     the US version of MSDOS 3.30 treats this as an unused function,
  8891.       setting AL=00h and returning immediately
  8892. SeeAlso: AX=6301h,AH=07h,AH=08h,AH=0Bh
  8893.  
  8894. Format of lead byte table entry:
  8895. Offset    Size    Description
  8896.  00h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8897.  02h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8898.     ...
  8899.   N   2 BYTEs    00h,00h end flag
  8900. ----------216300-----------------------------
  8901. INT 21 - Far East DOS 3.2+ - GET DOUBLE BYTE CHARACTER SET LEAD TABLE
  8902.     AX = 6300h
  8903. Return: AL = error code
  8904.         00h successful
  8905.         DS:SI -> DBCS table (see below)
  8906.         all other registers except CS:IP and SS:SP destroyed
  8907.         FFh not supported
  8908. Notes:    probably identical to AH=63h/AL=00h for DOS 2.25
  8909.     the US version of MSDOS 3.30 treats this as an unused function,
  8910.       setting AL=00h and returning immediately
  8911.     the US version of DOS 4.0+ accepts this function, but returns an empty
  8912.       list
  8913. SeeAlso: AX=6300h"DOS 2.25"
  8914.  
  8915. Format of DBCS table:
  8916. Offset    Size    Description
  8917.  00h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8918.  02h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8919.     ...
  8920.   N   2 BYTEs    00h,00h end flag
  8921. ----------216301-----------------------------
  8922. INT 21 - DOS 2.25, Far East DOS 3.2+ - SET KOREAN (HANGUL) INPUT MODE
  8923.     AX = 6301h
  8924.     DL = new mode
  8925.         00h return only full characters on DOS keyboard input functions
  8926.         01h    return partially-formed characters also
  8927. Return: AL = status
  8928.         00h successful
  8929.         FFh invalid mode
  8930. SeeAlso: AH=07h,AH=08h,AH=0Bh,AH=63h,AX=6302h
  8931. ----------216302-----------------------------
  8932. INT 21 - DOS 2.25, Far East DOS 3.2+ - GET KOREAN (HANGUL) INPUT MODE
  8933.     AX = 6302h
  8934. Return: AL = status
  8935.         00h successful
  8936.         DL = current input mode
  8937.             00h return only full characters
  8938.             01h return partial characters
  8939.         FFh not supported
  8940. SeeAlso: AH=07h,AH=08h,AH=0Bh,AH=63h,AX=6301h
  8941. ----------2164-------------------------------
  8942. INT 21 - DOS 3.2+ internal - SET DEVICE DRIVER LOOKAHEAD FLAG
  8943.     AH = 64h
  8944.     AL = flag
  8945.         00h (default) call device driver function 5 (non-dest read)
  8946.             before INT 21/AH=01h,08h,0Ah
  8947.         nonzero don't call driver function 5
  8948. Return: nothing
  8949. Notes:    called by DOS 3.3+ PRINT.COM
  8950.     does not use any of the DOS-internal stacks and is thus fully
  8951.       reentrant
  8952. SeeAlso: AH=01h,AH=08h,AH=0Ah,AX=5D06h
  8953. ----------2164--BX0000-----------------------
  8954. INT 21 - OS/2 v2.0 Virtual DOS Machine - GET/SET TASK TITLE
  8955.     AH = 64h
  8956.     BX = 0000h
  8957.     CX = 636Ch
  8958.     DX = function
  8959.         0000h enable automatic title switch on INT 21/AH=4Bh
  8960.         0001h set session title
  8961.         ES:DI -> new ASCIZ title or "" to restore original title
  8962.         0002h get session title
  8963.         ES:DI -> buffer for current title
  8964.         Return: buffer filled (single 00h if title never changed)
  8965. SeeAlso: INT 15/AH=12h/BH=05h,INT 21/AH=4Bh
  8966. ----------2165-------------------------------
  8967. INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
  8968.     AH = 65h
  8969.     AL = info ID
  8970.         01h get general internationalization info
  8971.         02h get pointer to uppercase table
  8972.         04h get pointer to filename uppercase table
  8973.         05h get pointer to filename terminator table
  8974.         06h get pointer to collating sequence table
  8975.         07h (DOS 4+) get pointer to Double-Byte Character Set table
  8976.     BX = code page (-1=global code page)
  8977.     DX = country ID (-1=current country)
  8978.     ES:DI -> country information buffer (see below)
  8979.     CX = size of buffer (>= 5)
  8980. Return: CF set on error
  8981.         AX = error code (see AH=59h)
  8982.     CF clear if succesful
  8983.         CX = size of country information returned
  8984.         ES:DI -> country information
  8985. Notes:    AL=05h appears to return same info for all countries and codepages; it
  8986.       has been documented for DOS 5.0, but was undocumented in ealier
  8987.       versions
  8988.     NLSFUNC must be installed to get info for countries other than the
  8989.       default
  8990.     subfunctions 02h and 04h are identical under OS/2
  8991. SeeAlso: AH=38h,INT 2F/AX=1401h,INT 2F/AX=1402h
  8992.  
  8993. Format of country information:
  8994. Offset    Size    Description
  8995.  00h    BYTE    info ID
  8996. ---if info ID = 01h---
  8997.  01h    WORD    size
  8998.  03h    WORD    country ID
  8999.  05h    WORD    code page
  9000.  07h 34 BYTEs    country-dependent info (see AH=38h)
  9001. ---if info ID = 02h---
  9002.  01h    DWORD    pointer to uppercase table (see below)
  9003. ---if info ID = 04h---
  9004.  01h    DWORD    pointer to filename uppercase table (see below)
  9005. ---if info ID = 05h---
  9006.  01h    DWORD    pointer to filename character table (see below)
  9007. ---if info ID = 06h---
  9008.  01h    DWORD    pointer to collating table (see below)
  9009. ---if info ID = 07h (DOS 4+)---
  9010.  01h    DWORD    pointer to DBCS lead byte table (see below)
  9011.  
  9012. Format of uppercase table:
  9013. Offset    Size    Description
  9014.  00h    WORD    table size
  9015.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  9016.  
  9017. Format of collating table:
  9018. Offset    Size    Description
  9019.  00h    WORD    table size
  9020.  02h 256 BYTEs    values used to sort characters 00h to FFh
  9021.  
  9022. Format of filename terminator table:
  9023. Offset    Size    Description
  9024.  00h    WORD    table size (not counting this word)
  9025.  02h    BYTE    ??? (01h for MSDOS 3.30-5.00)
  9026.  03h    BYTE    lowest permissible character value for filename
  9027.  04h    BYTE    highest permissible character value for filename
  9028.  05h    BYTE    ??? (00h for MSDOS 3.30-5.00)
  9029.  06h    BYTE    first excluded character in range \ all characters in this
  9030.  07h    BYTE    last excluded character in range  / range are illegal
  9031.  08h    BYTE    ??? (02h for MSDOS 3.30-5.00)
  9032.  09h    BYTE    number of illegal (terminator) characters
  9033.  0Ah  N BYTES    characters which terminate a filename:    ."/\[]:|<>+=;,
  9034. Note:    partially documented for DOS 5.0, but undocumented for earlier versions
  9035.  
  9036. Format of filename uppercase table:
  9037. Offset    Size    Description
  9038.  00h    WORD    table size
  9039.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  9040.  
  9041. Format of DBCS lead byte table:
  9042. Offset    Size    Description
  9043.  00h    WORD    length
  9044.  02h 2N BYTEs    start/end for N lead byte ranges
  9045.     WORD    0000h    (end of table)
  9046. ----------2165-------------------------------
  9047. INT 21 - DOS 4+ - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
  9048.     AH = 65h
  9049.     AL = function
  9050.         20h capitalize character
  9051.         DL = character to capitalize
  9052.         Return: DL = capitalized character
  9053.         21h capitalize string
  9054.         DS:DX -> string to capitalize
  9055.         CX = length of string
  9056.         22h capitalize ASCIZ string
  9057.         DS:DX -> ASCIZ string to capitalize
  9058. Return: CF set on error
  9059.         AX = error code (see AH=59h)
  9060.     CF clear if successful
  9061. Note:    these calls have been documented for DOS 5+, but were undocumented in
  9062.       DOS 4.x.
  9063. ----------216523-----------------------------
  9064. INT 21 U - DOS 4+ internal - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
  9065.     AX = 6523h
  9066.     DL = character
  9067.     DH = second character of double-byte character (if applicable)
  9068. Return: CF set on error
  9069.     CF clear if successful
  9070.         AX = type
  9071.         00h no
  9072.         01h yes
  9073.         02h neither yes nor no
  9074. ----------2165-------------------------------
  9075. INT 21 U - DOS 4+ internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
  9076.     AH = 65h
  9077.     AL = function
  9078.         A0h capitalize filename character
  9079.         DL = character to capitalize
  9080.         Return: DL = capitalized character
  9081.         A1h capitalize counted filename string
  9082.         DS:DX -> filename string to capitalize
  9083.         CX = length of string
  9084.         A2h capitalize ASCIZ filename
  9085.         DS:DX -> ASCIZ filename to capitalize
  9086. Return: CF set on error
  9087.         AX = error code (see AH=59h)
  9088.     CF clear if successful
  9089. Note:    nonfunctional in DOS 4.00 through 5.00 due to a bug (the code sets a
  9090.       pointer depending on the high bit of AL, but doesn't clear the
  9091.       bit before branching by function number).
  9092. ----------216601-----------------------------
  9093. INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
  9094.     AX = 6601h
  9095. Return: CF set on error
  9096.         AX = error code (see AH=59h)
  9097.     CF clear if successful
  9098.         BX = active code page (see AX=6602h)
  9099.         DX = system code page
  9100. SeeAlso: AX=6602h
  9101. ----------216602-----------------------------
  9102. INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
  9103.     AX = 6602h
  9104.     BX = active code page
  9105.         437 US
  9106.         850 Multilingual
  9107.         852 Slavic/Latin II (DOS 5+)
  9108.         857 Turkish
  9109.         860 Portugal
  9110.         861    Iceland
  9111.         863 Canada (French)
  9112.         865 Norway/Denmark
  9113.     DX = system code page (active page at boot time)
  9114. Return: CF set on error
  9115.         AX = error code (see AH=59h)
  9116.     CF clear if successful
  9117. SeeAlso: AX=6601h
  9118. ----------2167-------------------------------
  9119. INT 21 - DOS 3.3+ - SET HANDLE COUNT
  9120.     AH = 67h
  9121.     BX = size of new file handle table for process
  9122. Return: CF clear if successful
  9123.     CF set on error
  9124.         AX = error code (see AH=59h)
  9125. Desc:    adjust the size of the per-process open file table, thus raising or
  9126.       lowering the limit on the number of files the caller can open
  9127.       simultaneously
  9128. Notes:    if BX <= 20, no action is taken if the handle limit has not yet been
  9129.       increased, and the table is copied back into the PSP if the limit
  9130.       is currently > 20 handles
  9131.     for file handle tables of > 20 handles, DOS 3.30 never reuses the
  9132.       same memory block, even if the limit is being reduced; this can lead
  9133.       to memory fragmentation as a new block is allocated and the existing
  9134.       one freed
  9135.     only the first 20 handles are copied to child processes in DOS 3.3
  9136. BUG:    the original release of DOS 3.30 allocates a full 64K for the handle
  9137.       table on requests for an even number of handles
  9138. SeeAlso: AH=26h,AH=86h
  9139. ----------2168-------------------------------
  9140. INT 21 - DOS 3.3+ - "FFLUSH" - COMMIT FILE
  9141.     AH = 68h
  9142.     BX = file handle
  9143. Return: CF clear if successful
  9144.         all data still in DOS disk buffers is written to disk immediately,
  9145.           and the file's directory entry is updated
  9146.     CF set on error
  9147.         AX = error code (see AH=59h)
  9148. SeeAlso: AX=5D01h,AH=6Ah,INT 2F/AX=1107h
  9149. ----------2169-------------------------------
  9150. INT 21 U - DOS 4+ internal - GET/SET DISK SERIAL NUMBER
  9151.     AH = 69h
  9152.     AL = subfunction
  9153.         00h    get serial number
  9154.         01h set serial number
  9155.     BL = drive (0=default, 1=A, 2=B, etc)
  9156.     DS:DX -> disk info (see below)
  9157. Return: CF set on error
  9158.         AX = error code (see AH=59h)
  9159.     CF clear if successful
  9160.         AX destroyed
  9161.         (AL = 00h) buffer filled with appropriate values from extended BPB
  9162.         (AL = 01h) extended BPB on disk set to values from buffer
  9163. Notes:    does not generate a critical error; all errors are returned in AX
  9164.     error 0005h given if no extended BPB on disk
  9165.     does not work on network drives (error 0001h)
  9166.     buffer after first two bytes is exact copy of bytes 27h thru 3Dh of
  9167.       extended BPB on disk
  9168.     this function is supported under Novell NetWare versions 2.0A through
  9169.       3.11; the returned serial number is the one a DIR would display,
  9170.       the volume label is the NetWare volume label, and the file system
  9171.       is set to "FAT16".
  9172.     the serial number is computed from the current date and time when the
  9173.       disk is created; the first part is the sum of the seconds/hundredths
  9174.       and month/day, the second part is the sum of the hours/minutes and
  9175.       year
  9176.     the volume label which is read or set is the one stored in the extended
  9177.       BPB on disks formatted with DOS 4.0+, rather than the special root
  9178.       directory entry used by the DIR command in COMMAND.COM (use AH=11h
  9179.       to find that volume label)
  9180. SeeAlso: AX=440Dh
  9181.  
  9182. Format of disk info:
  9183. Offset    Size    Description
  9184.  00h    WORD    info level (zero)
  9185.  02h    DWORD    disk serial number (binary)
  9186.  06h 11 BYTEs    volume label or "NO NAME    " if none present
  9187.  11h  8 BYTEs    (AL=00h only) filesystem type--string "FAT12   " or "FAT16   "
  9188. ----------2169-------------------------------
  9189. INT 21 - DR-DOS 5.0 - NULL FUNCTION
  9190.     AH = 69h
  9191. Return: AL = 00h
  9192. SeeAlso: AH=18h
  9193. ----------216969-----------------------------
  9194. INT 21 - VIRUS - "Rape-747" - INSTALLATION CHECK
  9195.     AX = 6969h
  9196. Return: AX = 0666h if resident
  9197. SeeAlso: AX=58CCh,AH=76h"VIRUS"
  9198. ----------216A-------------------------------
  9199. INT 21 U - DOS 4+ - COMMIT FILE
  9200.     AH = 6Ah
  9201.     BX = file handle
  9202. Return: CF clear if successful
  9203.         AH = 68h
  9204.     CF set on error
  9205.         AX = error code (06h) (see AH=59h)
  9206. Note:    identical to AH=68h in DOS 5.0; not known whether this is the case in
  9207.       DOS 4.x
  9208. SeeAlso: AH=68h
  9209. ----------216B-------------------------------
  9210. INT 21 U - DOS 4.0 internal - ???
  9211.     AH = 6Bh
  9212.     AL = subfunction
  9213.         00h ???
  9214.         DS:SI -> Current Directory Structure???
  9215.         CL = drive (1=A:)
  9216.         01h ???
  9217.         DS:SI -> ???
  9218.         CL = file handle???
  9219.         02h ???
  9220.         DS:SI -> Current Directory Structure???
  9221.         DI = ???
  9222.         CX = drive (1=A:)
  9223. Return: CF set on error
  9224.         AX = error code (see INT 21/AH=59h)
  9225.     CF clear if successful
  9226. Note:    passed through to INT 2F/AX=112Fh with AX on top of stack
  9227. SeeAlso: AH=6Bh"DOS 5",INT 2F/AX=112Fh
  9228. ----------216B-------------------------------
  9229. INT 21 U - DOS 5.0 - NULL FUNCTION
  9230.     AH = 6Bh
  9231. Return: AL = 00h
  9232. Note:    this function does nothing and returns immediately
  9233. SeeAlso: AH=6Bh"DOS 4"
  9234. ----------216C00-----------------------------
  9235. INT 21 - DOS 4+ - EXTENDED OPEN/CREATE
  9236.     AX = 6C00h
  9237.     BL = open mode as in AL for normal open (INT 21/AH=3Dh)
  9238.         bit 7: inheritance
  9239.         bits 4-6: sharing mode
  9240.         bit 3 reserved
  9241.         bits 0-2: access mode
  9242.     BH = flags
  9243.         bit 6 = auto commit on every write
  9244.         bit 5 = return error rather than doing INT 24h
  9245.     CX = create attribute
  9246.         bits 6-15 reserved
  9247.         bit 5: archive
  9248.         bit 4: reserved
  9249.         bit 3: volume label
  9250.         bit 2: system
  9251.         bit 1: hidden
  9252.         bit 0: readonly
  9253.     DL = action if file exists/does not exists
  9254.         bits 7-4 action if file does not exist
  9255.             0000 fail
  9256.             0001 create
  9257.         bits 3-0 action if file exists
  9258.             0000 fail
  9259.             0001 open
  9260.             0010 replace/open
  9261.     DH = 00h (reserved)
  9262.     DS:SI -> ASCIZ file name
  9263. Return: CF set on error
  9264.        AX = error code (see AH=59h)
  9265.     CF clear if successful
  9266.        AX = file handle
  9267.        CX = 1 file opened
  9268.         2 file created
  9269.         3 file replaced
  9270. Note:    the PC LAN Program only supports DL=01h, DL=10h/sharing=compatibility,
  9271.       and DL=12h
  9272. SeeAlso: AH=3Ch,AH=3Dh
  9273. ----------217070BX6060-----------------------
  9274. INT 21 - PCW Weather Card interface - GET DATA SEGMENT
  9275.     AX = 7070h
  9276.     BX = 6060h
  9277.     CX = 7070h
  9278.     DX = 7070h
  9279.     SX = 7070h
  9280.     DX = 7070h
  9281. Return: AX = segment of data structure
  9282. Notes:    the data structure is at offset 516 from this segment.
  9283.     the update byte is at offset 514 from this segment.  Updates are
  9284.       once per second while this byte is nonzero and it is decremented
  9285.       once per second.  While this byte is 0 updates are once per minute.
  9286. SeeAlso: AX=7070h/BX=7070h
  9287.  
  9288. Format of data structure:
  9289. Offset    Type    Description
  9290.  00h    WORD    hour
  9291.  02h    WORD    minute
  9292.  04h    WORD    second
  9293.  06h    WORD    day
  9294.  08h    WORD    month
  9295.  0Ah    WORD    year
  9296.  0Ch    WORD    ???
  9297.  0Eh    WORD    relative barometric pressure (in 1/100 inches)
  9298.  10h    WORD    ???
  9299.  12h    WORD    ???
  9300.  14h    WORD    temperature 1 (in 1/10 degrees F)
  9301.  16h    WORD    temperature 1 lowest (in 1/10 degrees F)
  9302.  18h    WORD    temperature 1 highest (in 1/10 degrees F)
  9303.  1Ah    WORD    temperature 2 (in 1/10 degrees F)
  9304.  1Ch    WORD    temperature 2 lowest (in 1/10 degrees F)
  9305.  1Eh    WORD    temperature 2 highest (in 1/10 degrees F)
  9306.  20h    WORD    wind speed (in MPH)
  9307.  22h    WORD    average of 60 wind speed samples (in MPH)
  9308.  24h    WORD    highest wind speed (in MPH)
  9309.  26h    WORD    wind chill factor  (in 1/10 degrees F)
  9310.  28h    WORD    lowest wind chill factor (in 1/10 degrees F)
  9311.  2Ah    WORD    ???
  9312.  2Ch    WORD    wind direction (in degrees)
  9313.  2Eh    WORD    accumulated daily rainfall (in 1/10 inches)
  9314.  30h    WORD    accumulated annual rainfall (in 1/10 inches)
  9315. ----------217070BX7070-----------------------
  9316. INT 21 - PCW Weather Card interface - INSTALLATION CHECK
  9317.     AX = 7070h
  9318.     BX = 7070h
  9319.     CX = 7070h
  9320.     DX = 7070h
  9321.     SX = 7070h
  9322.     DX = 7070h
  9323. Return: AX = 0070h
  9324.     BX = 0070h
  9325.     CX = 0070h
  9326.     DX = 0070h
  9327.     SX = 0070h
  9328.     DX = 0070h
  9329. SeeAlso: AX=7070h/BX=6060h,AX=8080h
  9330. ----------2176-------------------------------
  9331. INT 21 - VIRUS - "Klaeren"/"Hate" - INSTALLATION CHECK
  9332.     AH = 76h
  9333. Return: AL = 48h if resident
  9334. SeeAlso: AX=6969h,AX=7700h"VIRUS"
  9335. ----------217761-----------------------------
  9336. INT 21 - WATCH.COM v3.2+ - INSTALLATION CHECK
  9337.     AX = 7761h ('wa')
  9338. Return: AX = 6177h
  9339. Note:    WATCH.COM is part of the "TSR" package by TurboPower Software
  9340. SeeAlso: INT 16/AX=7761h
  9341. ----------217700-----------------------------
  9342. INT 21 - VIRUS - "Growing Block" - INSTALLATION CHECK
  9343.     AX = 7700h
  9344. Return: AX = 0920h if resident
  9345. SeeAlso: AH=76h,AH=7Fh
  9346. ----------217F-------------------------------
  9347. INT 21 - VIRUS - "Squeaker" - INSTALLATION CHECK
  9348.     AH = 7Fh
  9349. Return: AH = 80h if resident
  9350. SeeAlso: AX=7700h,AH=83h"VIRUS"
  9351. ---------------------------------------------
  9352.